pytz.timezone('Asia/Shanghai').localize(1990,6,6)

Asked by qiuzhouxin on 2018-06-28

first command
pytz.timezone('Asia/Shanghai').localize(datetime.datetime(1990,1,1))
>>datetime.datetime(1990, 1, 1, 0, 0, tzinfo=<DstTzInfo 'Asia/Shanghai' CST+8:00:00 STD>)

second command
pytz.timezone('Asia/Shanghai').localize(datetime.datetime(1990,6,6))
>>datetime.datetime(1990, 6, 6, 0, 0, tzinfo=<DstTzInfo 'Asia/Shanghai' CDT+9:00:00 DST>)

third command
pytz.timezone('Asia/Shanghai').localize(datetime.datetime(2018,7,7))
>>datetime.datetime(2018, 7, 7, 0, 0, tzinfo=<DstTzInfo 'Asia/Shanghai' CST+8:00:00 STD>)

Question:
I think that the second command result should be
 'datetime.datetime(1990, 6, 6, 0, 0, tzinfo=<DstTzInfo 'Asia/Shanghai' CST+8:00:00 STD>)'

I confused that why the result happend

***the problem has been solved****
1986-1991 china have daylight saving time

Question information

Language:
English Edit question
Status:
Solved
For:
pytz Edit question
Assignee:
No assignee Edit question
Solved by:
qiuzhouxin
Solved:
2018-06-28
Last query:
2018-06-28
Last reply:
qiuzhouxin (qiuzhouxin) said : #1

1986-1991 china have daylight saving time