카테고리 없음
[mysql] CONVERT_TZ, UTC 날짜를 로컬 타임존으로 변경하기
냐옴
2023. 2. 14. 11:22
WITH TMP AS (
SELECT '2023-02-14 11:22:33' AS TZ_UTC
)
SELECT
TZ_UTC,
CONVERT_TZ(TZ_UTC,'+00:00','+09:00') AS TZ_ASIA_SEOUL
FROM TMP
;
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_convert-tz
MySQL :: MySQL 8.0 Reference Manual :: 12.7 Date and Time Functions
12.7 Date and Time Functions This section describes the functions that can be used to manipulate temporal values. See Section 11.2, “Date and Time Data Types”, for a description of the range of values each date and time type has and the valid formats
dev.mysql.com