← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~raharper/cloud-init:systemd_export_tz into cloud-init:master

 

Are hyou sure it wouldn't fix it?
changing os.environ should change the environment of the process that is running, which (I'd think) would have the same result.  Unless python is doing all those stats before we could set it (it may well do some).

I couldn't reproduce any difference with set or unset with a simple program like this:
import os, time
if 'TZ' not in os.environ:
    os.environ['TZ'] = ":/etc/localtime"
print(time.strftime("%a, %d %b %Y %T %z"))

And then running with:
  env -i TZ strace python program.py


I'm not opposed to this, and dont want to discount the performance improvement, but if we can do it in a single place, i'd rather that then in multiple systemd files which would only benefit systemd.


-- 
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/307722
Your team cloud init development team is requested to review the proposed merge of ~raharper/cloud-init:systemd_export_tz into cloud-init:master.


Follow ups

References