如何格式化时间并转换为格林威治标准时间? [英] How to format time and convert to gmt time?

查看:38
本文介绍了如何格式化时间并转换为格林威治标准时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个格式为 3/29/2010 的日期字符串.有人能告诉我如何将其转换为 GMT 时间吗?

I have a date string in the format of 3/29/2010. Can someone tell me how to convert it to GMT time?

推荐答案

这看起来很可疑,您正在尝试针对夏令时进行更正,而这实际上并不是您应该手动执行的操作.

This very suspiciously appears that you are trying to correct something for daylight savings time, which is not really something you should be doing manually.

您应该查看 datetime 文档,特别是与使用 时区.

You should review the datetime documentation, and specifically the portions related to using time zones.

这篇关于如何格式化时间并转换为格林威治标准时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆