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
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Assuming the computer time zone is not UTC and the browser supports input[date], select a date from the input[date] dropdown.
The input field will display a date in the localized format, for example "01.08.2014" in my case. My current timezone is GMT+4.
value is
"2014-07-31T20:00:00.000Z"
but expected is either
"2014-07-31T20:00:00.000-0400"
or
"2014-08-01T00:00:00.000Z"
It seems that the code that converts input[date].value into a Date model object first obtains the correct value "2014-07-31T20:00:00.000-0400" but then replaces the correct "-0400" suffix with incorrect "Z", or it is a matter of formatting when the date is formatted as localized but the timezone is not part of the format and instead the "Z" suffix is hardcoded..
The code that converts the string value of the input[date] into a Date model should follow the HTML5 input[type=date] guidelines and convert the value string as if it is the start of the day in the UTC regardless of the current timezone.