On 24/03/17 21:19, Andrew Martin wrote:
> Hello,
> 
> I recently saw this blog post regarding performance when the TZ environment
> variable is not set:
> https://blog.packagecloud.io/eng/2017/02/21/set-environment-variable-save-thousands-of-system-calls/
> 

There's also a good deal of discussion on the HN thread:
https://news.ycombinator.com/item?id=13697555

> I tried defining TZ in /etc/environment and in /etc/profile.d/test.sh, but I
> cannot get this environment variable to be available in all cases (e.g. if I
> just execute bash without --login or if I run the sample c program provided in
> the above article). How can I make the TZ environment variable defined
> completely system-wide?

Before you go too far with that, is there a specific reason you want to
do this? For example, there's not generally a lot of advantage unless
you have a process that does a lot of timezone-based processing.

However, all you should need in /etc/environment is:

TZ=:/etc/localtime

or an equivalent TZ value, e.g.:

TZ=:Europe/London


J


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to