develog

[Oracle] time zone, utc, local time 본문

DB/Oracle

[Oracle] time zone, utc, local time

냐옴 2015. 11. 2. 22:54

SELECT

    SYSTIMESTAMP

    , TO_CHAR(SYSTIMESTAMP, 'YYYY-MM-DD HH24:MI:SS TZR')

    , TO_CHAR(SYS_EXTRACT_UTC(SYSTIMESTAMP), 'YYYY-MM-DD HH24:MI:SS TZR')

    , TO_CHAR(FROM_TZ(SYS_EXTRACT_UTC(SYSTIMESTAMP), 'UTC') AT TIME ZONE '+08:00', 'YYYY-MM-DD HH24:MI:SS TZR')

FROM DUAL



'DB > Oracle' 카테고리의 다른 글

[Oracle] function-based index 조회  (0) 2016.02.04
[Oracle] SYSTIMESTAMP time zone  (0) 2016.02.03
[Oracle] time zone  (0) 2015.11.02
[Oracle] NLS parameter  (0) 2015.10.30
[Oracle] 제품 버전 확인  (0) 2015.10.29
Comments