diff options
author | Gerhard Weis <g.weis@griffith.edu.au> | 2014-02-27 11:13:44 +1000 |
---|---|---|
committer | Gerhard Weis <g.weis@griffith.edu.au> | 2014-02-27 11:13:44 +1000 |
commit | 80a8e6d13778252f626dfb8d7503648335e23482 (patch) | |
tree | df00a07909317af1de21bf7201bb194e1e2f2bc8 /src/isodate/tzinfo.py | |
parent | 308302303068ecd149957a958c9d71625771c0f9 (diff) | |
download | isodate-80a8e6d13778252f626dfb8d7503648335e23482.tar.gz |
make flake happy
Diffstat (limited to 'src/isodate/tzinfo.py')
-rw-r--r-- | src/isodate/tzinfo.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/isodate/tzinfo.py b/src/isodate/tzinfo.py index 820c88d..b41f058 100644 --- a/src/isodate/tzinfo.py +++ b/src/isodate/tzinfo.py @@ -9,6 +9,7 @@ import time ZERO = timedelta(0) # constant for zero time offset. + class Utc(tzinfo): '''UTC @@ -23,19 +24,22 @@ class Utc(tzinfo): def tzname(self, dt): ''' - Return the time zone name corresponding to the datetime object dt, as a string. + Return the time zone name corresponding to the datetime object dt, + as a string. ''' return "UTC" def dst(self, dt): ''' - Return the daylight saving time (DST) adjustment, in minutes east of UTC. + Return the daylight saving time (DST) adjustment, in minutes east + of UTC. ''' return ZERO UTC = Utc() # the default instance for UTC. + class FixedOffset(tzinfo): ''' A class building tzinfo objects for fixed-offset time zones. @@ -80,18 +84,19 @@ class FixedOffset(tzinfo): return "<FixedOffset %r>" % self.__name -STDOFFSET = timedelta(seconds = -time.timezone) +STDOFFSET = timedelta(seconds=-time.timezone) # locale time zone offset # calculate local daylight saving offset if any. if time.daylight: - DSTOFFSET = timedelta(seconds = -time.altzone) + DSTOFFSET = timedelta(seconds=-time.altzone) else: DSTOFFSET = STDOFFSET DSTDIFF = DSTOFFSET - STDOFFSET # difference between local time zone and local DST time zone + class LocalTimezone(tzinfo): """ A class capturing the platform's idea of local time. |