equal
deleted
inserted
replaced
|
1 if confirm('use Europe/Paris as timezone?'): |
|
2 timezone = 'Europe/Paris' |
|
3 else: |
|
4 import pytz |
|
5 while True: |
|
6 timezone = raw_input('enter your timezone') |
|
7 if timezone in pytz.common_timezones: |
|
8 break |
|
9 |
|
10 dbdriver = repo.system_source.dbdriver |
|
11 if dbdriver == 'postgres': |
|
12 sql("SET TIME ZONE '%s'" % timezone) |
|
13 |
|
14 for entity in schema.entities(): |
|
15 if entity.final: |
|
16 continue |
|
17 change_attribute_type(entity.type, 'creation_date', 'TZDatetime', ask_confirm=False) |
|
18 change_attribute_type(entity.type, 'modification_date', 'TZDatetime', ask_confirm=False) |
|
19 |
|
20 if dbdriver == 'postgres': |
|
21 sql("SET TIME ZONE UTC") |