unexpected results converting timezones in python

前端 未结 5 1980
谎友^
谎友^ 2020-11-27 17:27

I\'m trying to understand why I\'m getting these results when converting timezones to UTC:

In [74]: d1 = datetime(2007, 12, 5, 6, 30,tzinfo=pytz.timezone(\'U         


        
5条回答
  •  北海茫月
    2020-11-27 18:10

    Print d2_aware before .astimezone and you see PST-1 (Pacific Standard Time) but in first example you have LMT-1 (Local Mean Time) - and probably it can give 7 minutes difference.

    But I don't know why pytz use different timezones.

提交回复
热议问题