It's been a while since I was in charge of the server-side project. Moreover, the environment is db & windows & Java etc. (T, T) Therefore, I will make a note of terms and other matters related to studying.
ISO international standard for date and time notation
Basic format: YYYYMMDDThhmmss + 0900 Example) 20200531T115959 + 0900
Local average solar time in Greenwich, England (0 degrees longitude) (The time when the average sun is in the south is noon) |
Greenwich Observatory Old Main Building
Basically a cesium atomic clock using cesium atoms
JST (Japan Standard Time) UTC + 9 hours (time difference of 135 degrees east longitude)
UNIX time (POSIX) Formal seconds elapsed from UNIX epoch in UTC
It is a calendar system that has been used since October 15, 1582 (Gregorian calendar). (The 226th Pope Gregory XIII ordered the improvement of the Julian calendar, which was the previous lunar calendar.)
"・ Wikiiso 8601" (https://ja.wikipedia.org/wiki/ISO_8601) [・ Wiki-GMT (Greenwich Mean Time)](https://ja.wikipedia.org/wiki/%E3%82%B0%E3%83%AA%E3%83%8B%E3%83%83%E3 % 82% B8% E6% A8% 99% E6% BA% 96% E6% 99% 82) [・ Wiki-UTC (Coordinated Universal Time) (https://ja.wikipedia.org/wiki/%E5%8D%94%E5%AE%9A%E4%B8%96%E7%95%8C%E6% 99% 82) ・ Wiki-UNIX time
JAVA (Version: 1.8)
１。OffsetDateTime An invariant representation of date / time using offsets. Stores all date and time fields to nanosecond precision, as well as offsets from UTC / Greenwich. Example 1) "2nd October 2007 at 13: 45.30.123456789 +02: 00" Example 2) Instance generation of(LocalDateTime date,ZoneOffset zone) of(LocalDate date, LocalTime time, ZoneOffset zone)
２。LocalDateTime An immutable date / time object that represents a date / hour (often displayed as year-month-day-hour-minute-second). You can also access other date and time fields (such as "day of the year", day of the week, "week number of the year"). Time is expressed to nanosecond precision. Example 1) "13: 45.30.123456789 on October 2, 2007" Example 2) Instance generation of(LocalDate date, LocalTime time)
３。Timestamp A thin wrapper around java.util.Date that the JDBC API can identify as a SQLTIMESTAMP value.
Example 1) Instance generation valueOf(LocalDateTime date)
https://docs.oracle.com/javase/jp/8/docs/api/java/time/OffsetDateTime.html https://docs.oracle.com/javase/jp/8/docs/api/java/time/LocalDateTime.html https://docs.oracle.com/javase/jp/8/docs/api/java/sql/Timestamp.html