Store dates in UTC, convert like a pro, and never mess up a user’s local time again, with just a few lines of code.
Hi Marcus, is there a good reason, why you prefer OffsetDateTime over Instant?
Thank you for a nice article!
Because OffsetDateTime preserves context.
Capture both the moment in time and
The user’s original timezone offset.
And with setting the Hibernate property correctly, it's stored as UTC.
Thanks for your kind words!
Hi Marcus, is there a good reason, why you prefer OffsetDateTime over Instant?
Thank you for a nice article!
Because OffsetDateTime preserves context.
Capture both the moment in time and
The user’s original timezone offset.
And with setting the Hibernate property correctly, it's stored as UTC.
Thanks for your kind words!