Fix convert to local time across dst #24
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey,
I ran into an issue when trying to convert a local date which has its moment after the DST switch point of the target time zone but the converted date is really before the DST switch.
For me that was the 1st of Oct 2023 in Australia/Melbourne but it really happens for any similar use case. The moment of 1st Oct locally here (UTC+3) is already DST-off in Melbourne, but at the moment of 1st of Oct in Melbourne DST is still on.
This PR has the fix together with a good bunch of tests around it. And the PR also updates "npm-run-all" which is rather old and can not install due to a hacked and deleted dependency.
Cheers