Hi,
Please help me understand what I got wrong below (my timezone is -08:00).
\dateTime[now->?x]@\btp, \dateTime[now(utc)->?y]@\btp, \dateTime[now(1)->?z]@\btp
?x = "2026-01-09T07:00:17Z"^^\dateTime
?y = "2026-01-09T15:00:17Z"^^\dateTime
?z = "2026-01-09T15:00:17+01:00"^^\dateTime
?x seems incorrect, it is the correct localtime, but expressed as UTC. It should be \dt"2026-01-09T07:00:17".
?y seems correct.
?z seems incorrect, it should be \dt"2026-01-09T16:00:17+01:00".
\dt"2026-01-09T16:00:17+01:00"[localtime -> ?x]@\btp.
?x = "2026-01-09T17:00:17"^^\dateTime
?x seems incorrect, should have been \dt"2026-01-09T16:00:17", i,e, the same date time, but as localtime in that time zone.
\dt"2026-01-09T16:00:17+01:00"[toTZ(-8,0) -> ?x]@\btp.
?x = "2026-01-09T16:00:17-08:00"^^\dateTime
?x should have been \dt"2026-01-09T07:00:17-08:00", i.e. the same date time but as seen from the provided timezone.
For completeness:
\dt"2026-01-09T07:00:17"[toUTC(-8, 0) -> ?x]@\btp
?x = "2026-01-09T15:00:17-08:00"^^\dateTime
This seems correct, the localtime in converted into a date time in the specified time zone.
Please advise.