Return the Time Zone Designator as an offset in seconds from UTC.
(m)
| 3410 | return hours, minutes, seconds |
| 3411 | |
| 3412 | def __extract_tzd(m): |
| 3413 | '''Return the Time Zone Designator as an offset in seconds from UTC.''' |
| 3414 | if not m: |
| 3415 | return 0 |
| 3416 | tzd = m.group('tzd') |
| 3417 | if not tzd: |
| 3418 | return 0 |
| 3419 | if tzd == 'Z': |
| 3420 | return 0 |
| 3421 | hours = int(m.group('tzdhours')) |
| 3422 | minutes = m.group('tzdminutes') |
| 3423 | if minutes: |
| 3424 | minutes = int(minutes) |
| 3425 | else: |
| 3426 | minutes = 0 |
| 3427 | offset = (hours*60 + minutes) * 60 |
| 3428 | if tzd[0] == '+': |
| 3429 | return -offset |
| 3430 | return offset |
| 3431 | |
| 3432 | __date_re = ('(?P<year>\d\d\d\d)' |
| 3433 | '(?:(?P<dsep>-|)' |
no test coverage detected
searching dependent graphs…