我在红移表中有一个日期时间列。它包含UTC格式的日期。 因此,当我根据UTC + 5:30/UTC + 4:30这样的time_zone查询时,我想将表日期时间列转换为选定的time_zone并继续。它给了我错误的结果。在Amazon Redshift中转换时区
使用这种方法: CONVERT_TIMEZONE([ 'source_zone',] 'target_zone', '时间戳')
查询类型1:错误输入,正确答案
SELECT id, convert_timezone('UTC+5:30','UTC', date) as converted_time, ingest_date
FROM table_name
WHERE conditions
查询类型2:正确输入,错误的答案 - >它再次在列减去5:30之日起
SELECT id , convert_timezone('UTC','UTC+5:30',ingest_date) as converted_time, ingest_date
FROM table_name
WHERE conditions
查询类型3:输入错误,正确的答案
SELECT id, convert_timezone('UTC','UTC-5:30',ingest_date) as converted_time, ingest_date
FROM table_name
WHERE conditions
如何转换/解析UTC列到选定的时区?