首页 \ 问答 \ 在时区将ZonedDateTime转换为LocalDateTime(Convert ZonedDateTime to LocalDateTime at time zone)

在时区将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 this

ZonedDateTime 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 be 16 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 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 ...
  • 我有同样的问题,我能够解决它。 afk5min是对的,问题是您在远程存储库上更改了代码的分支。 根据标准git实践( http://git-scm.com/book/en/Git-Basics-Working-with-Remotes ),您需要(现在)将远程存储库中的这些更改合并到您的本地更改之前可以承诺 这是有道理的,这迫使您采取其他的更改并将其合并到代码中,确保您的代码继续与其他更改一起运行。 无论如何,对步骤。 配置“fetch”以获取您最初从中提取的分支。 获取远程分支。 将远程分支合并到您的本地 ...
  • 强制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 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 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。