Nexters/rezoom-backend

Timestamp 시간 오류

Closed this issue · 1 comments

  • Mysql의 자료형 DateTime이 Java의 Timestamp와 호환이 안되는 것 같다. (정확히 9시간 차이남) 다른 방식으로 해야할 듯..

In MySQL 5 and above, TIMESTAMP values are converted from the current time zone to UTC for storage, and converted back from UTC to the current time zone for retrieval. (This occurs only for the TIMESTAMP data type, and not for other types such as DATETIME.)
By default, the current time zone for each connection is the server's time. The time zone can be set on a per-connection basis, as described in MySQL Server Time Zone Support.

출처 : https://stackoverflow.com/questions/409286/should-i-use-the-datetime-or-timestamp-data-type-in-mysql