mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
use exmachina to configure timezone
This commit is contained in:
parent
53d1d8f280
commit
09fbb23e90
@ -1,4 +1,4 @@
|
|||||||
import os, shutil, subprocess
|
import os, subprocess
|
||||||
from socket import gethostname
|
from socket import gethostname
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
@ -132,8 +132,8 @@ class general(FormPlugin, PagePlugin):
|
|||||||
message += msg
|
message += msg
|
||||||
if time_zone != sys_store['time_zone']:
|
if time_zone != sys_store['time_zone']:
|
||||||
src = os.path.join("/usr/share/zoneinfo", time_zone)
|
src = os.path.join("/usr/share/zoneinfo", time_zone)
|
||||||
cfg.log.info("Copying %s to /etc/localtime" % src)
|
cfg.log.info("Setting timezone to %s" % time_zone)
|
||||||
shutil.copy(src, "/etc/localtime")
|
cfg.exmachina.misc.set_timezone(time_zone)
|
||||||
sys_store['time_zone'] = time_zone
|
sys_store['time_zone'] = time_zone
|
||||||
return message or "Settings updated."
|
return message or "Settings updated."
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user