Correct the timezone information on the given datetime
(self, dt, is_dst=False)
| 246 | return dt.replace(tzinfo=self) |
| 247 | |
| 248 | def normalize(self, dt, is_dst=False): |
| 249 | '''Correct the timezone information on the given datetime''' |
| 250 | if dt.tzinfo is self: |
| 251 | return dt |
| 252 | if dt.tzinfo is None: |
| 253 | raise ValueError('Naive time - no tzinfo set') |
| 254 | return dt.astimezone(self) |
| 255 | |
| 256 | def __repr__(self): |
| 257 | return "<UTC>" |
nothing calls this directly
no outgoing calls
no test coverage detected