Allow non UTC lastUpdateTimestamp#12350
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
|
I may be missing something, but I'm not sure if this is the right way to address the issue. So, the way the format was hardcoded in was in fact correct - I think it's fair to reject any other formats there. What was not correct was that it was parsed ignoring the time zone completely, so it defaulted to local. But it just needs to force the UTC, aka "+00:00" - and then everything will just work. I think? |
| if (date == null) { | ||
| LocalDateTime dtIN = null; | ||
| try { | ||
| dtIN = sourceLastUpdateTime != null ? LocalDateTime.parse(sourceLastUpdateTime, DateTimeFormatter.ISO_OFFSET_DATE_TIME) : null; |
There was a problem hiding this comment.
DateTimeFormatter.ISO_INSTANT is what we want here, I believe.
That will force the "2011-12-03T10:15:30Z"-like format; and the resulting date will be parsed as UTC.
|
Closing |
What this PR does / why we need it:
Which issue(s) this PR closes:#12349
Special notes for your reviewer:
Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Additional documentation: