From 44712d351f449fb9fca3e42ef3e67f51a7c2c258 Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Fri, 16 Sep 2016 08:42:09 +0000
Subject: [PATCH] Task #9607: timezone utc

---
 .../RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py   | 4 ++++
 .../ResourceAssignmentDatabase/radbpglistener.py              | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py b/SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py
index 36acbcfefab..e66822e21b6 100755
--- a/SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py
+++ b/SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py
@@ -92,6 +92,10 @@ class RATaskStatusChangedListener(RABusListener):
 __all__ = ["RATaskStatusChangedListener"]
 
 def main():
+    # make sure we run in UTC timezone
+    import os
+    os.environ['TZ'] = 'UTC'
+
     from optparse import OptionParser
     from lofar.messaging import setQpidLogLevel
     from lofar.common.util import waitForInterrupt
diff --git a/SAS/ResourceAssignment/ResourceAssignmentDatabase/radbpglistener.py b/SAS/ResourceAssignment/ResourceAssignmentDatabase/radbpglistener.py
index d6fbb82c38b..5fedde628a3 100644
--- a/SAS/ResourceAssignment/ResourceAssignmentDatabase/radbpglistener.py
+++ b/SAS/ResourceAssignment/ResourceAssignmentDatabase/radbpglistener.py
@@ -175,6 +175,10 @@ class RADBPGListener(PostgresListener):
             logger.error(str(e))
 
 def main():
+    # make sure we run in UTC timezone
+    import os
+    os.environ['TZ'] = 'UTC'
+
     # Check the invocation arguments
     parser = OptionParser("%prog [options]",
                           description='runs the radb postgres listener which listens to changes on some tables in the radb and publishes the changes as notifications on the bus.')
-- 
GitLab