Closed timozander closed 4 months ago
Hey! Could you please explain a bit why did you close the PR? I didn't get into the details, but it seems the library confused you. I want to address it.
Hi thanks for the response. I thought I'd ran into a problem with the library but I was ultimately just parsing a non-compliant string (like 2020-01-1
with a missing 0
) which is not guaranteed to give any consistent output. So I would also not expect UTCDate
to do so 😁
Calling
new UTCDate()
with a string yields wrong results. For example, if I am right of UTC (e.g. Berlin), then I would expectHowever, it insteads outputs it in local time:
This PR fixes it by treating the string as UTC