Skip to content

Fix timezone parsing for ISO8601 dates#741

Merged
gionn merged 1 commit into
masterfrom
timezone-parsing-fix
Sep 22, 2021
Merged

Fix timezone parsing for ISO8601 dates#741
gionn merged 1 commit into
masterfrom
timezone-parsing-fix

Conversation

@malteo
Copy link
Copy Markdown
Member

@malteo malteo commented Sep 21, 2021

No description provided.

@cloudesiresonarqubeprchecks
Copy link
Copy Markdown

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
Copy Markdown
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