3 ms·
Instant in history -> GMT+0/UTC Future shedule for humans to coordinate (contracts, meetings) -> ZonedDateTime Personal alarm that should be kept in sync with
by falserum 3y ago
Instant in history -> GMT+0/UTC
Future shedule for humans to coordinate (contracts, meetings) -> ZonedDateTime
Personal alarm that should be kept in sync with the sun (e.g. go to sleep) -> LocalDateTime
What’s good example/purpose for OffsetDateTime?
- jcranmer 3y agoOffsetDateTime would be useful for a lot of historical records. For example, if I'm chronicling a WW2 battle in the Pacific, I need to know what the local times of the events were, but I don't necessarily care about knowing the DST rules. Additionally, most date/time serialization formats (e.g., RFC 822, ISO 3601) only allow you to specify up to OffsetDateTime and don't provide a full timezone reference like US/Eastern.