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