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 On Sat, Jun 11, 2022 at 11:52 PM Jinwoo Lee <[email protected]> wrote: > > 6!:0 gives me the current time. It gives year, month, day, hour, minute, > and second but it doesn't give the timezone information. So with any of the > foreign functions of 6!:x, I don't seem to be able to get the current time > as a number, for example in unix time or in J's nanosecond time because I > can't get the machine's timezone. > > I also looked at "dates.ijs" in the standard library and the > "types/datetime" addon, but they don't seem to provide it either. > > Is there a way to do that? > > Thanks, > Jinwoo > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
