# HG changeset patch # User Jeff Hammel # Date 1415039766 28800 # Node ID 7c4ee496794c5459227a03a670ce444b2b8865ed # Parent cd9d65e6e2abd3fb7a314ef102ff6843317034a2 dst diff -r cd9d65e6e2ab -r 7c4ee496794c python/epoch2date.py --- a/python/epoch2date.py Thu Oct 30 15:22:29 2014 -0700 +++ b/python/epoch2date.py Mon Nov 03 10:36:06 2014 -0800 @@ -52,7 +52,11 @@ # output if not options.display_utc: print ("{} seconds since epoch".format(s)) - print ("{} {}".format(dt, time.tzname[time.daylight])) + if time.daylight and time.localtime(s).tm_isdst: + tz_index = 1 + else: + tz_index = 0 + print ("{} {}".format(dt, time.tzname[tz_index])) print ("{} UTC".format(dt2)) if __name__ == '__main__':