What's the difference between Instant and LocalDateTime?

后端 未结 4 954
野的像风
野的像风 2020-11-22 01:18

I know that:

  • Instant is rather a \"technical\" timestamp representation (nanoseconds) for computing.
  • LocalDateTime i
4条回答
  •  青春惊慌失措
    2020-11-22 01:53

    Instant corresponds to time on the prime meridian (Greenwich).

    Whereas LocalDateTime relative to OS time zone settings, and

    cannot represent an instant without additional information such as an offset or time-zone.

提交回复
热议问题