Setting TZ variable

Alexey Romanov alexey.v.romanov@REDACTED
Thu Dec 2 15:59:15 CET 2010


I've tried to follow the advice given by Ulf Wiger in this old thread:
http://www.erlang.org/pipermail/erlang-questions/2006-December/024291.html

However, it doesn't work for me:

aromanov@REDACTED:~/workspace/gmcontroller$ erl
Erlang R14B (erts-5.8.1) [source] [smp:2:2] [rq:2] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.8.1  (abort with ^G)
1> os:getenv("TZ").
false
2> time().
{17,49,40}
3> os:putenv("TZ", "GMT").
true
4> os:getenv("TZ").
"GMT"
5> time().
{17,50,8}

Am I doing something wrong?

Setting TZ in the shell does work (but isn't suitable for my purposes):

aromanov@REDACTED:~/workspace/gmcontroller$ TZ=GMT erl
Erlang R14B (erts-5.8.1) [source] [smp:2:2] [rq:2] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.8.1  (abort with ^G)
1> os:getenv("TZ").
"GMT"
2> time().
{14,50,39}

Yours, Alexey Romanov


More information about the erlang-questions mailing list