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

Fix timezone parsing for ISO8601 dates #741

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Conversation

malteo
Copy link
Member

@malteo malteo commented Sep 21, 2021

No description provided.

@cloudesiresonarqubeprchecks
Copy link

@@ -4,7 +4,7 @@
{
public static final String DATE_PATTERN = "yyyy-MM-dd";
public static final String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm";
public static final String ISO8601_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
public static final String ISO8601_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSSX";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Letter Date or Time Component Presentation Examples
Z Time zone RFC 822 time zone -0800
X Time zone ISO 8601 time zone -08; -0800; -08:00
    ISO 8601 Time zone:

    ...

    For parsing, "Z" is parsed as the UTC time zone designator.

https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html#iso8601timezone

@gionn gionn merged commit 65884da into master Sep 22, 2021
@gionn gionn deleted the timezone-parsing-fix branch September 22, 2021 08:53
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.

2 participants