You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the fromMillis is not respecting the timezone parameter. The docs say that it should default to UTC, but it appears to default to the system/browser timezone. Also you can not manually set the timezone.
[
$fromMillis(1514808000000, 'Week: [w] of [xNn]'),
$fromMillis(1514808000000, 'Week: [w] of [xNn]', "+0000"),
$fromMillis(1514808000000, 'Week: [w] of [xNn]', "+0900")
]
Expected result
[
"Week: 1 of January",
"Week: 1 of January",
"Week: 5 of December"
]
Actual result
[
"Week: 5 of December",
"Week: 5 of December",
"Week: 5 of December"
]
This is causing tests the fail when they are run in other timezones, and likely causing incorrect results for anyone using the fromMillis function.
Also related to #347 and the lack of daylight-savings-time support.
aside I think that this should probably get patched, but also might want to direct people to using their system-native functions for formatting, like the Intl browser API and Luxon or moment.js. Datetime processing is notoriously difficult to get right.
The text was updated successfully, but these errors were encountered:
It appears that the
fromMillis
is not respecting the timezone parameter. The docs say that it should default to UTC, but it appears to default to the system/browser timezone. Also you can not manually set the timezone.Example JSONata expression: http://try.jsonata.org/rymaAsdZ8
Expected result
Actual result
This is causing tests the fail when they are run in other timezones, and likely causing incorrect results for anyone using the
fromMillis
function.Also related to #347 and the lack of daylight-savings-time support.
aside I think that this should probably get patched, but also might want to direct people to using their system-native functions for formatting, like the
Intl
browser API and Luxon or moment.js. Datetime processing is notoriously difficult to get right.The text was updated successfully, but these errors were encountered: