New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyoungyang time zone issue. #15

Closed
knight76 opened this Issue Jun 19, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@knight76

knight76 commented Jun 19, 2018

Hi!

I found a time zone issue which changed Pyongyang(North Korea) time zoned recently.
According to 'https://en.wikipedia.org/wiki/Time_in_North_Korea', I found 'On 29 April 2018, North Korean leader Kim Jong-un announced his country would be returning to UTC+9 to realign its clocks with South Korea. '. It based on the Guadian Newspaper('https://www.theguardian.com/world/2018/may/05/time-for-change-north-korea-moves-clocks-forward-to-match-south')

Below code is not match the Wiki.

import pytz
import datetime

def main():
	
	seoul = pytz.timezone('Asia/Seoul')
	print(seoul.localize(datetime.datetime.now()))
	
	pyongyang = pytz.timezone('Asia/Pyongyang')
	print(pyongyang.localize(datetime.datetime.now()))
	
if __name__ == '__main__':
	main()

The result is below.

2018-06-19 18:23:36.818206+09:00
2018-06-19 18:23:36.818469+08:30

Second result should be equal to '2018-06-19 18:23:36.818469+09:00'

Could you change code and and document(https://github.com/stub42/pytz/blob/master/tz/asia#L1997)?

And When I test the previous example, I found another interesting sample code.

>>> import pytz

>>> from datetime import datetime

>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'

>>> seoul = pytz.timezone('Asia/Seoul')

>>> seoul

<DstTzInfo 'Asia/Seoul' KST+8:30:00 STD>
>>> pyongyang = pytz.timezone('Asia/Pyongyang')
>>> pyounyang

<DstTzInfo 'Asia/Pyongyang' KST+8:30:00 STD>

Finally, I found another interesting document. You described world timezone. Previsous menthioned, I think it should be changed.

https://github.com/stub42/pytz/blob/master/tz/asia#L47
https://github.com/stub42/pytz/blob/master/tz/asia#L50
-> I think it should be removed at '8:30 KST KDT Korea when at +0830', maintained at ''9:00 KST KDT Korea when at +09'.

Thanks in advance.

@stub42

This comment has been minimized.

Owner

stub42 commented Jun 29, 2018

New version is (finally) out with the updated database.

@stub42 stub42 closed this Jun 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment