[Jprogramming] How to get the timezone?

Martin Kreuzer info at airkreuzer.com
Mon Jun 13 18:40:30 UTC 2022


On my phone (Android v4.4.4) I get

    2!:5 'TZ'
0

which is to say that this environment variable doesn't exist?

    JVERSION
Engine: j03/j32/android
Release-a: commercial/2022-01-08T13:47:02
Library: 9.03.08
J Android: 1.4.17/4.4.4/19
...

-M

At 2022-06-12 04:01, you wrote:

>If you are running under a unix-like operating system, 2!:5'TZ' should work.
>
>If you are running under windows, on an older version of J, I think
>2!:0'tzutil /g' would work.
>
>In more recent versions of J, something has gone wrong with 2!:0 so
>instead you would use
>
>require'task'
>shell'tzutil /g'
>
>Note that all of these approaches provide a textual result.
>
>I hope this helps,
>
>--
>Raul
>
>For information about J forums see http://www.jsoftware.com/forums.htm



More information about the Programming mailing list