jupyter - Python LMT to GMT offset -0001 -
i trying convert time utc time below code
fmt = "%y-%m-%d %h:%m:%s %z%z" st = dt.datetime.strptime("16:35:00", '%h:%m:%s') tz = pytz.timezone("europe/london") st = st.replace(tzinfo=tz) print(st.strftime(fmt)) st = st.astimezone(tz=pytz.utc) print(st.strftime(fmt))
it prints
1900-01-01 16:35:00 lmt-0001 1900-01-01 16:36:00 utc+0000
why offset 1 minute?
note:i using python 3 in jupyter notebook here
Comments
Post a Comment