在时区将ZonedDateTime转换为LocalDateTime(Convert ZonedDateTime to LocalDateTime at time zone)
我有一个像这样构造的
ZonedDateTime
对象ZonedDateTime z = ZonedDateTime.of(LocalDate.now().atTime(11, 30), ZoneOffset.UTC);
我如何将它转换为瑞士时区的
LocalDateTime
? 预计的结果应该是16 april 2018 13:30
。I have an object of
ZonedDateTime
that is constructed like thisZonedDateTime z = ZonedDateTime.of(LocalDate.now().atTime(11, 30), ZoneOffset.UTC);
How can I convert it to
LocalDateTime
at time zone of Switzerland? Expected result should be16 april 2018 13:30
.
原文:https://stackoverflow.com/questions/49853999
更新时间:2024-03-15 07:03
最满意答案
强制
git push
:git push origin +develop
Force
git push
:git push origin +develop
相关问答
更多-
git拒绝推送非快进(git rejected push non-fast-forward)[2022-05-12]
在推送之前,您必须提供中央存储库中的更改。 做 git add -A git commit -m "my local changes" git pull 解决任何冲突。 然后呢 git push 或者,如果您本地没有宝贵的修改,则可以创建新的回购克隆,并从此开始工作: git clone https://johnsproject@bitbucket.org/johnsproject/proj.git new_repo_dir There are changes in the central repo ... -
先改变: git pull origin branch_name Pull changes first: git pull origin branch_name
-
看来,有人推送了最后一次git fetch和git push之间的新提交。 在这种情况下,您需要再次重复您的步骤并my_feature_branch 。 git fetch git rebase feature/my_feature_branch git push origin feature/my_feature_branch 在git fetch后,我建议使用gitk --all来检查情况。 It looks, that someone pushed new commits between your ...
-
Egit拒绝不快(Egit rejected non-fast-forward)[2022-04-30]
我有同样的问题,我能够解决它。 afk5min是对的,问题是您在远程存储库上更改了代码的分支。 根据标准git实践( http://git-scm.com/book/en/Git-Basics-Working-with-Remotes ),您需要(现在)将远程存储库中的这些更改合并到您的本地更改之前可以承诺 这是有道理的,这迫使您采取其他的更改并将其合并到代码中,确保您的代码继续与其他更改一起运行。 无论如何,对步骤。 配置“fetch”以获取您最初从中提取的分支。 获取远程分支。 将远程分支合并到您的本地 ... -
Git不快退拒绝(Git non-fast-forward rejected)[2022-12-22]
强制git push : git push origin +develop Force git push: git push origin +develop -
GitHub有一个很好的部分,称为“ 处理”非快速“错误 ” 这个错误可能有点压倒一切,不要害怕。 简单地说,git不能在不丢失提交的情况下对远程进行更改,因此拒绝推送 。 通常这是由另一个用户推送到同一个分支引起的。 您可以通过提取和合并远程分支来解决这个问题,或者使用pull来同时执行。 在其他情况下,此错误是通过使用诸如git commit --amend或git rebase类的命令在本地进行破坏性更改的结果。 虽然您可以通过将--force添加到push命令来覆盖该远程,但如果您绝对确定这是您想要 ...
-
正如错误消息所示: git pull before you try to git push 。 显然,您的本地分行与您的跟踪分支不同步。 根据项目规则和工作流程,您可能还需要使用git pull --rebase 。 As the error message says: git pull before you try to git push. Apparently your local branch is out of sync with your tracking branch. Depending on ...
-
我有一个坏习惯,按下“提交修改”按钮,因为我想要有前一个提交消息。 我没有意识到我实际上做了修改......现在一切都像一个魅力。 感谢大家的帮助:-) I had the bad habit to press the “commit amend” button because i wanted to have the previous commit message. I didn't realize that I actual made a amend... Now Everything work as ...
-
即使在'git pull'之后,Git也会出现“非快进更新”错误(Git gives 'non-fast-forward updates' error even after 'git pull')[2024-01-12]
'git push'的语法支持显式和简写版本。 显式版git push github master适合你。 简写版git push没有。 如果你使用简写版本,你不告诉git使用什么遥控器和什么本地分支将被推到什么远程分支。 因此git必须猜测你的意思。 您可以使用远程设置和push.default配置来配置: push.default Defines the action git push should take if no refspec is given on the ... -
您应该能够强制推送(假设您已将bitbucket设置为远程“origin”): git checkout develop git push -f origin develop 请注意,在执行此操作之前,您可能需要重置本地开发分支(如果它现在指向您的拉/合并提交): git checkout develop git reset --hard new_hash_of_abcd3 git push -f origin develop You should be able to force the push w ...