Skip to main content

Module timezone

Module timezone 

Source

Enums§

TzSpec

Functions§

extract_embedded_timezone_before_year
Extract a Unix ctime / date mid-string timezone token immediately preceding a trailing 4-digit year (e.g. "Thu Nov 26 14:30:00 UTC 2026", "Mon Jan 15 09:00:00 CEST 2026").
extract_trailing_timezone
extract_trailing_timezone_with_abbrevs
Peel off a trailing timezone token from a date string, honoring custom abbreviations and JavaScript / RFC-2822 parenthesized timezone comments such as "Thu Nov 26 2026 14:30:00 GMT+0300 (Turkey Time)".
finalize_datetime
Apply parsed timezone + Settings (TIMEZONE, TO_TIMEZONE, RETURN_AS_TIMEZONE_AWARE) to produce the final ParsedDateTime.
parse_numeric_offset
parse_tz_spec
Resolve a timezone name, abbreviation, or numeric offset (e.g. “UTC”, “Europe/Istanbul”, “+03:00”, “EST”).
parse_tz_spec_with_abbrevs
Resolve a timezone name, abbreviation, or numeric offset checking custom overrides first.
pop_tz_offset_from_string
Equivalent of dateparser.timezone_parser.pop_tz_offset_from_string.