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

Date.parse should default to local time #1083

Merged
merged 1 commit into from Feb 14, 2022

Conversation

shlomo-ildar
Copy link
Contributor

@shlomo-ildar shlomo-ildar commented Feb 13, 2022

Moved the following formats from DefaultFormats to SecondaryFormats:
"yyyy-MM-ddTHH:mm:ss.FFF",
"yyyy-MM-ddTHH:mm:ss",
"yyyy-MM-ddTHH:mm",

Test updates:
ShouldParseAsUtc:
[InlineData("1970-01-01T00:00Z")]
[InlineData("1970-01-01T00:00:00Z")]
[InlineData("1970-01-01T00:00:00.000Z")]

ShouldParseAsLocalTime:
[InlineData("1970-01-01T00:00")]
[InlineData("1970-01-01T00:00:00")]
[InlineData("1970-01-01T00:00:00.000")]

fixes #1077

@lahma lahma changed the title Date.parse fix (1077) Date.parse should default to local time Feb 14, 2022
@lahma lahma merged commit bb070cc into sebastienros:main Feb 14, 2022
@lahma
Copy link
Collaborator

lahma commented Feb 14, 2022

Thank you!

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

Successfully merging this pull request may close these issues.

Date.parse treats date-time string without time zone specified as UTC time instead of local one
2 participants