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
Serializing a date and then parsing it again should work in alpine docker images:
(base) Simon@Mac-Pro ~ % docker run -it node:18
Welcome to Node.js v18.12.1.
Type ".help"for more information.
> new Date(new Date().toLocaleString('en-US', { timeZone: 'Europe/Berlin' }))
2022-11-16T14:25:30.000Z
> .exit
(base) Simon@Mac-Pro ~ % docker run -it node:alpine
Welcome to Node.js v19.1.0.
Type ".help"for more information.
> new Date(new Date().toLocaleString('en-US', { timeZone: 'Europe/Berlin' }))
2022-11-16T14:25:30.000Z
> .exit
Current Behavior
Serializing a date and then parsing it again breaks in alpine images and returns an invalid date:
(base) Simon@Mac-Pro ~ % docker run -it node:18
Welcome to Node.js v18.12.1.
Type ".help"for more information.
> new Date(new Date().toLocaleString('en-US', { timeZone: 'Europe/Berlin' }))
2022-11-16T14:25:30.000Z
> .exit
(base) Simon@Mac-Pro ~ % docker run -it node:alpine
Welcome to Node.js v19.1.0.
Type ".help"for more information.
> new Date(new Date().toLocaleString('en-US', { timeZone: 'Europe/Berlin' }))
Invalid Date
> .exit
Possible Solution
Switch away from alpine docker image
Steps to Reproduce
(base) Simon@Mac-Pro ~ % docker run -it node:alpine
Welcome to Node.js v19.1.0.
Type ".help"for more information.
> new Date(new Date().toLocaleString('en-US', { timeZone: 'Europe/Berlin' }))
Invalid Date
> .exit
Additional Information
Upon inspection of the serialized string it seems that the alpine version uses the 8239 whitespace instead of 32.:
You're 2 examples are comparing Node 18 and 19, not just regular vs Alpine. This would still probably need to be reported upstream, as there isn't anything in this repo that would be able to address this
@nschonni You're right - its indeed caused by node 19 and not specifically by the alpine build. Also seems like its already being tracked by nodejs/node#45171 so no need for this issue 🙂
Environment
Expected Behavior
Serializing a date and then parsing it again should work in alpine docker images:
Current Behavior
Serializing a date and then parsing it again breaks in alpine images and returns an invalid date:
Possible Solution
Switch away from alpine docker image
Steps to Reproduce
Additional Information
Upon inspection of the serialized string it seems that the alpine version uses the
8239
whitespace instead of32
.:Expected:
'[49,49,47,49,54,47,50,48,50,50,44,32,50,58,50,56,58,49,50,32,80,77]'
Actual:
'[49,49,47,49,54,47,50,48,50,50,44,32,50,58,50,56,58,49,50,8239,80,77]'
The text was updated successfully, but these errors were encountered: