mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
config: Handle miscellaneous time zones also
- In appears that in Debian it is possible to set the timezones from one of the listed items in zonetab.info or addtitional timezones from the directory /usr/share/zoneinfo/Etc/. Add these too. - By default all FreedomBox images have Etc/UTC as time zone. This is now properly listed.
This commit is contained in:
parent
b1c11b5cc7
commit
da3e92312c
@ -24,6 +24,7 @@ from django.contrib import messages
|
||||
from django.core import validators
|
||||
from django.template.response import TemplateResponse
|
||||
from gettext import gettext as _
|
||||
import glob
|
||||
import logging
|
||||
import re
|
||||
import socket
|
||||
@ -111,7 +112,14 @@ separated by dots.'),
|
||||
pass
|
||||
|
||||
time_zones.sort()
|
||||
return time_zones
|
||||
|
||||
additional_time_zones = [
|
||||
path[len('/usr/share/zoneinfo/'):]
|
||||
for path in glob.glob('/usr/share/zoneinfo/Etc/*')]
|
||||
|
||||
# Add additional time zones at the top to make them more
|
||||
# noticeable because people won't look for them
|
||||
return additional_time_zones + time_zones
|
||||
|
||||
|
||||
def init():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user