콘텐츠로 이동

현재 연결의 시간대를 반환합니다.

PlaidCloud Lakehouse는 기본 시간대로 UTC(협정 세계시)를 사용하며, 시간대를 현재 지리적 위치에 맞게 변경할 수 있습니다. timezone 설정에 지정할 수 있는 값은 https://docs.rs/chrono-tz/latest/chrono_tz/enum.Tz.html 을 참조하십시오. 자세한 내용은 아래 예시를 참조하십시오.

func.timezone()
func.timezone()
┌─────────────────────┐
│ timezone │
├─────────────────────┤
│ UTC │
└─────────────────────┘
SELECT TIMEZONE();
-- Return the current timezone
SELECT TIMEZONE();
┌─────────────────┐
│ TIMEZONE('UTC') │
├─────────────────┤
│ UTC │
└─────────────────┘
-- Set the timezone to China Standard Time
SET timezone='Asia/Shanghai';
SELECT TIMEZONE();
┌───────────────────────────┐
│ TIMEZONE('Asia/Shanghai') │
├───────────────────────────┤
│ Asia/Shanghai │
└───────────────────────────┘