How can i convert a datetime string like this: 2012-09-03 22:00
US Estern to UTC timezone?
如何将日期时间字符串转换为UTC?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- douyi3632 2012-08-07 11:12关注
You should look at the
DateTime
object and its related functions in the documentation.If your input date is already in a string format,
DateTime::createFromFormat()
will help you create an epoch-type integer date the object can work with. After that, it's justgetTimezone()
andsetTimezone()
.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 stm32f103zet6 串口5无法收发数据
- ¥15 宝塔面板的data内存要怎么清理呢
- ¥15 关于C语言使用线程队列实现多线程并发
- ¥15 这个运行,错误在哪里呀,大家看看吧,教导我
- ¥15 advanceinstaller对话框设置
- ¥100 正常上网,内部网页无法打开
- ¥15 组件库引入并使用在若依框架未展示
- ¥149 关于#使用python 的Flash Echarts+ajax+mysql动态数据实现饼图#的问题,请各位专家解答!
- ¥15 RichTextBox中追加文本时报错
- ¥15 关于c语言的学习问题