Lines Matching refs:dt
105 def utcoffset(self, dt): argument
106 return self._find_trans(dt).utcoff
108 def dst(self, dt): argument
109 return self._find_trans(dt).dstoff
111 def tzname(self, dt): argument
112 return self._find_trans(dt).tzname
114 def fromutc(self, dt): argument
117 if not isinstance(dt, datetime):
119 if dt.tzinfo is not self:
122 timestamp = self._get_local_timestamp(dt)
132 timestamp, dt.year
152 dt += tti.utcoff
154 return dt.replace(fold=1)
156 return dt
158 def _find_trans(self, dt): argument
159 if dt is None:
165 ts = self._get_local_timestamp(dt)
167 lt = self._trans_local[dt.fold]
175 return self._tz_after.get_trans_info(ts, dt.year, dt.fold)
185 def _get_local_timestamp(self, dt): argument
187 (dt.toordinal() - EPOCHORDINAL) * 86400
188 + dt.hour * 3600
189 + dt.minute * 60
190 + dt.second