永发信息网

PST8PDT,M3.2.0,M11.1.0 是什么意思

答案:2  悬赏:0  手机版
解决时间 2021-03-04 15:55
PST8PDT,M3.2.0,M11.1.0 是什么意思
最佳答案
On Windows, the calculation of when DST starts is incorrect. Windows OS
seems to be fully patched, and correctly changed to DST on 3-8-2009.
However, datetime.now() is 1 hour less then Windows displayed time.

I even tried setting the TZ environment variable to
PST8PDT,M3.2.0,M11.1.0 to fully specify the date change.

Below you can see that today (3-27-08) is marked as standard time, while
July 1st is DST and Jan 1st is Standard, if I understand the meaning of
the 9th element of the timetuple:

ON WINDOWS, with windows reporting the time as 3:59pm:
>>> july1 = datetime(2009, 7, 1)
>>> jan1 = datetime(2009, 1, 1)
>>> time.localtime(time.mktime(july1.timetuple()))
(2009, 7, 1, 0, 0, 0, 2, 182, 1)
>>> time.localtime(time.mktime(jan1.timetuple()))
(2009, 1, 1, 0, 0, 0, 3, 1, 0)
>>> time.localtime(time.mktime(datetime.now().timetuple()))
(2009, 3, 27, 14, 59, 46, 4, 86, 0)

It worked correctly on Linux, though:
>>> july1 = datetime(2009,7,1)
>>> jan1 = datetime(2009,1,1)
>>> time.localtime(time.mktime(july1.timetuple()))
(2009, 7, 1, 0, 0, 0, 2, 182, 1)
>>> time.localtime(time.mktime(jan1.timetuple()))
(2009, 1, 1, 0, 0, 0, 3, 1, 0)
>>> time.localtime(time.mktime(datetime.now().timetuple()))
(2009, 3, 27, 15, 57, 2, 4, 86, 1)
msg94678 - (view) Author: (acummings) Date: 2009-10-29 17:07
The same thing happens with the autumn transition. Windows knows the
transition has changed, but python does not seem to know that:

The following interactive session was run on Oct 29th, at 10:02 (Windows
clock reported 10:02):

>>> july1 = datetime(2009, 7, 1)
>>> jan1 = datetime(2009, 1,1)
>>> oct30 = datetime(2009, 10, 30)
>>> time.localtime(time.mktime(july1.timetuple()))
(2009, 7, 1, 0, 0, 0, 2, 182, 1)
>>> time.localtime(time.mktime(jan1.timetuple()))
(2009, 1, 1, 0, 0, 0, 3, 1, 0)
>>> time.localtime(time.mktime(oct30.timetuple()))
(2009, 10, 30, 0, 0, 0, 4, 303, 0)
>>> time.localtime(time.mktime(datetime.now().timetuple()))
(2009, 10, 29, 9, 2, 38, 3, 302, 0)

Again, the 9th element of the timetuple is 1 for July 1st, 0 for Jan
1st, and **0** for Oct 30th and Oct 29th. Also, the time reported by
datetime.now() was 9:02, one hour behind
所以说呢,它只不过是一个标签
全部回答
可以私聊我~
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
有没有给孩子买东西舍得,给自己买东西不舍得
农夫与蛇,我想问一下,有以下一个案例:一位运
很黄很暴力的日本动漫对青少年的毒害
我在大清当皇帝增加妃子宫女上限是什么意思?
瑞银轮胎销售部地址在哪,我要去那里办事
什么有腿不会走
南甸村怎么去啊,有知道地址的么
ImageReady保存gif格式为何变成灰色
该图表示三类货物生产运输过程中的相关特征图
我是一名文科生,今年刚刚毕业,想学宠物医学
锦州市政务服务中心这个地址在什么地方,我要
头昏脑胀乏力吃什么药
【感谢公司的话】我要写段感恩的话主要是对公
为什么我喝了三豆汤后经常放屁?
喝汤的时候能不能不发出声音啊?
推荐资讯
阿娇主演过哪些电影或电视剧
成都全心汽车销售服务有限公司地址在哪,我要
邯郸市比安阳市大多少?
成都福之星车业有限公司在哪里啊,我有事要去
感恩七年感情的句子
洪泽县蒋坝镇农民工活动中心怎么去啊,有知道
小康路/东大街(路口)在哪里啊,我有事要去这
朝阳福源种猪场地址在哪,我要去那里办事
4g的卡放在3g手机里会不会影响它的作用
这段视频开始的那首歌叫什么
金立手机出现1970年安装包怎什办
好心情浴池地址在什么地方,想过去办事
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?