Code review comment for ~raharper/cloud-init:systemd_export_tz

Revision history for this message
Scott Moser (smoser) wrote :

based on the findings above/my understanding, this should be equivalent to your suggested change:

--- a/cloudinit/cmd/main.py
+++ b/cloudinit/cmd/main.py
@@ -694,4 +694,6 @@ def main(sysv_args=None):

 if __name__ == '__main__':
+ if 'TZ' not in os.environ:
+ os.environ[TZ] = ":/etc/localtime"
     main(sys.argv)

python is doing the additional stats' I suspect with the intent of being more dynamic / allowing an update to /etc/TZ to affect subsequent calls to datetime() .

« Back to merge proposal