summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/bcfg2.conf.55
-rw-r--r--src/lib/Server/Hostbase/settings.py7
-rw-r--r--src/lib/Server/Reports/settings.py2
3 files changed, 11 insertions, 3 deletions
diff --git a/man/bcfg2.conf.5 b/man/bcfg2.conf.5
index 394bb347d..f2e47b7ac 100644
--- a/man/bcfg2.conf.5
+++ b/man/bcfg2.conf.5
@@ -325,6 +325,11 @@ Host for database connections. Not used for sqlite3.
.B database_port
Port for database connections. Not used for sqlite3.
+.TP
+.B time_zone
+Specify a time zone other than that used on the system. (Note that this
+will cause the bcfg2 server to log messages in this time zone as well).
+
.SH COMMUNICATION OPTIONS
Specified in the [communication] section. These options define
diff --git a/src/lib/Server/Hostbase/settings.py b/src/lib/Server/Hostbase/settings.py
index dadf98d24..a42fd5b2e 100644
--- a/src/lib/Server/Hostbase/settings.py
+++ b/src/lib/Server/Hostbase/settings.py
@@ -44,8 +44,11 @@ DATABASE_HOST = options['database_host']
# Set to empty string for default. Not used with sqlite3.
DATABASE_PORT = int(options['database_port'])
# Local time zone for this installation. All choices can be found here:
-# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
-TIME_ZONE = 'America/Chicago'
+# http://docs.djangoproject.com/en/dev/ref/settings/#time-zone
+try:
+ TIME_ZONE = c.get('statistics', 'time_zone')
+except:
+ TIME_ZONE = None
# enter the defauly MX record machines will get in Hostbase
# this setting may move elsewhere eventually
diff --git a/src/lib/Server/Reports/settings.py b/src/lib/Server/Reports/settings.py
index 81220c0e3..b725783ca 100644
--- a/src/lib/Server/Reports/settings.py
+++ b/src/lib/Server/Reports/settings.py
@@ -49,7 +49,7 @@ if DATABASE_ENGINE == 'sqlite3' and DATABASE_NAME == '':
try:
TIME_ZONE = c.get('statistics', 'time_zone')
except:
- TIME_ZONE = 'America/Chicago'
+ TIME_ZONE = None
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes