Date/Time

Date/Time with TimeZone

  • Use UTC format for exchange of time-related data across time zones.

  • Time zones in ISO 8601 are represented as local time (with the location unspecified), as UTC, or as an offset from UTC.

  • Resources

Java

  • JSR-310 Date and Time API

    Date Time Types in Java & SQL

  • Types

    • java.time.Instant

      Best way to represent a point in time in UTC

    • java.time.LocalDateTime

      Best way to represent a date and time without a time zone

    • java.time.ZonedDateTime

      Best way to represent a date and time with a time zone

UTC