|
Lines 135-141
Link Here
|
| 135 |
# get timezone |
135 |
# get timezone |
| 136 |
if os.path.exists('/etc/timezone'): |
136 |
if os.path.exists('/etc/timezone'): |
| 137 |
with open('/etc/timezone') as fd: |
137 |
with open('/etc/timezone') as fd: |
| 138 |
values['timezone'] = fd.readline().strip() |
138 |
timezone = fd.readline().strip() |
|
|
139 |
try: |
| 140 |
timezone = timezone.decode('UTF-8') |
| 141 |
except UnicodeDecodeError: |
| 142 |
timezone = timezone.decode('ISO8859-1') |
| 143 |
values['timezone'] = timezone |
| 139 |
else: |
144 |
else: |
| 140 |
values['timezone']='' |
145 |
values['timezone']='' |
| 141 |
|
146 |
|