Skip to content

gtime, ltime

Global and local time

gtime

UTC equivalent of local timestamp

gtime ts    gtime[ts]

Where ts is a datetime/timestamp, returns the UTC datetime/timestamp.

q).z.p
2009.10.20D10:52:17.782138000
q)gtime .z.P                      / same timezone as .z.p
2009.10.20D10:52:17.783660000

ltime

Local equivalent of UTC timestamp

ltime ts    ltime[ts]

Where ts is a datetime/timestamp, returns the local datetime/timestamp.

q).z.P
2009.11.05D15:21:10.040666000
q)ltime .z.p                  / same timezone as .z.P
2009.11.05D15:21:10.043235000

System clocks

UTC and local datetime/timestamps are available as

scope datetime timestamp ------------------------------ UTC .z.z .z.p local .z.Z .z.P


Environment