| 320 | return None, None |
| 321 | |
| 322 | def __calc_timezone(self): |
| 323 | # Set self.timezone by using time.tzname. |
| 324 | # Do not worry about possibility of time.tzname[0] == time.tzname[1] |
| 325 | # and time.daylight; handle that in strptime. |
| 326 | try: |
| 327 | time.tzset() |
| 328 | except AttributeError: |
| 329 | pass |
| 330 | self.tzname = time.tzname |
| 331 | self.daylight = time.daylight |
| 332 | no_saving = frozenset({"utc", "gmt", self.tzname[0].lower()}) |
| 333 | if self.daylight: |
| 334 | has_saving = frozenset({self.tzname[1].lower()}) |
| 335 | else: |
| 336 | has_saving = frozenset() |
| 337 | self.timezone = (no_saving, has_saving) |
| 338 | |
| 339 | |
| 340 | class TimeRE(dict): |