Skip to content

Commit

Permalink
load timezone database at once
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Dec 10, 2018
1 parent 1eb804e commit 24b6846
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firebirdsql/tz_utils.py
Expand Up @@ -3,7 +3,8 @@
timezone_id_by_name = {}

def load_timezone_ids(connection):
global id_to_name
if timezone_name_by_id:
return
cur = connection.cursor()
cur.execute("select count(*) from rdb$relations where rdb$relation_name='RDB$TIME_ZONES' and rdb$system_flag=1")
if cur.fetchone()[0]:
Expand Down

0 comments on commit 24b6846

Please sign in to comment.