Update time.py
This commit is contained in:
parent
4f760f5edb
commit
41c2341bf7
@ -4,12 +4,15 @@ class command():
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
def run(self, environment):
|
def run(self, environment):
|
||||||
try:
|
#this is the way to load the settings:
|
||||||
#Need to load time string from config file.
|
# general is the section in the config file, timeFormat is the variable
|
||||||
except Exception as e:
|
# this has to been added to settings.conf in sectino [general]
|
||||||
# Sane default
|
# timeFormat=%H:%M;%P
|
||||||
timeString = '%H:%M;%P'
|
# the following has to been added to core/settings.py to the key 'general'
|
||||||
|
# the settings.py is used for default values
|
||||||
|
# 'timeFormat':"%H:%M;%P",
|
||||||
|
timeString = environment['runtime']['settingsManager'].getSetting(environment,'general', 'timeFormat')
|
||||||
|
|
||||||
timeString = datetime.datetime.strftime(datetime.datetime.now(), '%H:%M:%P')
|
timeString = datetime.datetime.strftime(datetime.datetime.now(), '%H:%M:%P')
|
||||||
return environment
|
return environment
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
|
Loading…
Reference in New Issue
Block a user