Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$toMillis() fails when a timezone is added to picture string #477

Closed
rcrichton opened this issue Oct 2, 2020 · 1 comment · Fixed by #483
Closed

$toMillis() fails when a timezone is added to picture string #477

rcrichton opened this issue Oct 2, 2020 · 1 comment · Fixed by #483
Labels

Comments

@rcrichton
Copy link

Both of these expressions fail to execute on any version of JSONata:

$toMillis('2020-09-09 00:00:00 +02:00', '[Y0001]-[M01]-[D01] [H01]:[m01]:[s01] [Z]')
$toMillis($now('[Y0001]-[M01]-[D01] [H01]:[m01]:[s01] [Z]', '+0200'), '[Y0001]-[M01]-[D01] [H01]:[m01]:[s01] [Z]')

If you remove the timezone from the picture string and timestamp string everything work as normal.

Links to try these out:

@andrew-coleman
Copy link
Member

Looks like this was never implemented for parsing a timestamp, only for formatting. I'll mark this as a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants