Lines Matching full:dt
11 def utcoffset(self, dt): argument
14 def tzname(self, dt): argument
17 def dst(self, dt): argument
33 def utcoffset(self, dt): argument
36 def tzname(self, dt): argument
39 def dst(self, dt): argument
56 def utcoffset(self, dt): argument
57 if self._isdst(dt):
62 def dst(self, dt): argument
63 if self._isdst(dt):
68 def tzname(self, dt): argument
69 return _time.tzname[self._isdst(dt)]
71 def _isdst(self, dt): argument
72 tt = (dt.year, dt.month, dt.day,
73 dt.hour, dt.minute, dt.second,
74 dt.weekday(), 0, 0)
84 def first_sunday_on_or_after(dt): argument
85 days_to_go = 6 - dt.weekday()
87 dt += timedelta(days_to_go)
88 return dt
127 def tzname(self, dt): argument
128 if self.dst(dt):
133 def utcoffset(self, dt): argument
134 return self.stdoffset + self.dst(dt)
136 def dst(self, dt): argument
137 if dt is None or dt.tzinfo is None:
141 # implementation) passes a datetime with dt.tzinfo is self.
143 assert dt.tzinfo is self
147 if 2006 < dt.year:
149 elif 1986 < dt.year < 2007:
151 elif 1966 < dt.year < 1987:
156 start = first_sunday_on_or_after(dststart.replace(year=dt.year))
157 end = first_sunday_on_or_after(dstend.replace(year=dt.year))
160 # dt first.
161 if start <= dt.replace(tzinfo=None) < end: