Module Import alias Import alias FunctionDef arguments args NameParam defaults body Expr Str Import alias FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str TupleLoad NameLoad NameLoad NameLoad decorator_list If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Str Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str If BoolOpAnd CompareNotIn NameLoad TupleLoad Str Str NameLoad CompareNotIn Str NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Import alias If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr NameLoad Dict If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore Call AttributeLoad NameLoad attr NameLoad Dict Index NameLoad TupleLoad NameLoad NameLoad Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index Str Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad For NameStore Call NameLoad Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad ListComp TupleLoad NameLoad NameLoad NameLoad comprehension TupleStore NameStore TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr NameLoad If NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Index Num orelse Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str TupleLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num orelse Return Num Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index Str Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return BinOpAdd NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad IfExp CompareLt NameLoad Num Str Str BinOpDiv NameLoad Num BinOpDiv BinOpMod NameLoad Num Num Return BinOpAdd Call AttributeLoad NameLoad attr Str Call AttributeLoad BinOpAdd NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str TupleLoad NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list
N/A N/A time N/A datetime loadTimezones N/A N/A db N/A N/A N/A 
    Insert (interesting) timezones from 'pg_timezone_names' into 'timezones'

    The 'pg_timezone_names' table contains all the information we want (but
    typically unnecessarily many different timezones) but is very slow to query,
    so can't be used during normal operations.
     N/A configuration add N/A N/A name abbrev utc_offset N/A N/A N/A N/A N/A cursor execute INSERT INTO timezones (name, abbrev, utc_offset)
                               VALUES (%s, %s, %s) N/A name abbrev utc_offset N/A N/A N/A N/A N/A configuration database DRIVER postgresql N/A N/A cursor N/A N/A db cursor N/A N/A N/A cursor execute DELETE FROM timezones N/A N/A add Universal/UTC UTC N/A N/A datetime timedelta N/A N/A N/A cursor execute SELECT name, abbrev, utc_offset FROM pg_timezone_names N/A N/A full_name abbrev utc_offset N/A N/A cursor fetchall N/A N/A N/A region _ name N/A N/A full_name partition / N/A N/A N/A region N/A posix Etc name N/A / name N/A N/A N/A add full_name abbrev utc_offset N/A N/A N/A db commit N/A updateTimezones N/A N/A db N/A N/A N/A 
    Update UTC offses in 'timezones' with values in 'pg_timezone_names'

    The UTC offsets in 'pg_timezone_names' are DST adjusted (for the timezones
    we care about) so we need to copy the values regularly to keep the cached
    values in 'timezones' up-to-date.
     N/A configuration N/A N/A N/A N/A configuration database DRIVER postgresql N/A N/A cursor N/A N/A db cursor N/A N/A N/A cursor execute UPDATE timezones
                             SET utc_offset=pg_timezone_names.utc_offset
                            FROM pg_timezone_names
                           WHERE pg_timezone_names.name=timezones.name N/A N/A N/A db commit N/A __fetchTimezones N/A N/A db N/A N/A N/A groups N/A N/A N/A N/A db storage N/A Timezones get None N/A N/A N/A groups N/A N/A cursor N/A N/A db cursor N/A N/A N/A cursor execute SELECT name, abbrev, utc_offset FROM timezones N/A N/A full_name abbrev utc_offset N/A N/A cursor fetchall N/A N/A N/A group name N/A N/A full_name split / N/A N/A isinstance utc_offset int N/A N/A utc_offset N/A N/A datetime timedelta utc_offset N/A N/A N/A N/A groups setdefault group N/A N/A name N/A abbrev utc_offset N/A N/A N/A N/A db storage N/A Timezones N/A None groups N/A groups N/A sortedTimezones N/A N/A db N/A N/A N/A groups N/A __fetchTimezones db N/A result N/A N/A key N/A sorted N/A N/A groups keys N/A N/A N/A N/A result append N/A key N/A sorted N/A N/A name abbrev utc_offset N/A N/A name N/A abbrev utc_offset N/A N/A N/A groups N/A key items N/A result N/A __fetchUTCOffset N/A N/A db timezone N/A N/A N/A utc_offset N/A N/A N/A N/A db storage N/A Timezones get timezone N/A N/A utc_offset None N/A N/A groups N/A N/A N/A N/A db storage N/A Timezones get None N/A groups N/A N/A N/A group name N/A N/A timezone split / N/A utc_offset N/A N/A N/A groups N/A group N/A name N/A 2 N/A N/A cursor N/A N/A db cursor N/A N/A N/A cursor execute SELECT utc_offset FROM timezones WHERE name=%s N/A timezone N/A row N/A N/A cursor fetchone N/A row N/A N/A utc_offset N/A row N/A 0 N/A N/A 0 N/A N/A N/A N/A db storage N/A Timezones N/A timezone utc_offset N/A utc_offset N/A adjustTimestamp N/A N/A db timestamp timezone N/A N/A N/A N/A timestamp N/A __fetchUTCOffset db timezone N/A formatTimestamp N/A N/A db timestamp timezone N/A N/A N/A utc_offset N/A __fetchUTCOffset db timezone N/A seconds N/A N/A utc_offset total_seconds N/A offset N/A  %s%02d:%02d N/A N/A N/A seconds 0 - + N/A seconds 3600 N/A N/A seconds 3600 60 N/A N/A N/A N/A time strftime %Y-%m-%d %H:%M N/A N/A N/A timestamp utc_offset timetuple offset N/A validTimezone N/A N/A db timezone N/A N/A N/A cursor N/A N/A db cursor N/A N/A N/A cursor execute SELECT 1 FROM timezones WHERE name=%s N/A timezone N/A N/A bool N/A N/A cursor fetchone N/A