Convert timestamp from UTC(将时间戳从 UTC 转换)¶
Supported in: Batch, Faster, Streaming
Converts a timestamp from UTC to a given time zone.
Expression categories: Datetime
Declared arguments¶
- Time zone: Target time zone. Will take daylight savings into account for cities, but not for three digit codes.
TimeZone - Timestamp: Timestamp column.
Expression\
Output type: Timestamp
Examples¶
Example 1: Base case¶
Argument values:
- Time zone: Australia/Sydney
- Timestamp: 2020-04-28T10:09:00Z
Output: 2020-04-28T20:09:00Z
Example 2: Base case¶
Argument values:
- Time zone: EST
- Timestamp: 2020-04-28T10:09:00Z
Output: 2020-04-28T05:09:00Z
Example 3: Base case¶
Argument values:
- Time zone: America/Denver
- Timestamp: 2020-04-28T10:09:00Z
Output: 2020-04-28T04:09:00Z
Example 4: Base case¶
Argument values:
- Time zone: America/Denver
- Timestamp: 2020-02-09T10:09:00Z
Output: 2020-02-09T03:09:00Z
Example 5: Base case¶
Argument values:
- Time zone: UTC
- Timestamp: 2020-04-28T10:09:00Z
Output: 2020-04-28T10:09:00Z
Example 6: Base case¶
Argument values:
- Time zone: EST
- Timestamp: 2020-01-28T10:09:00Z
Output: 2020-01-28T05:09:00Z
Example 7: Null case¶
Argument values:
- Time zone: UTC
- Timestamp: null
Output: null
中文翻译¶
将时间戳从 UTC 转换¶
支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)
将时间戳从 UTC 转换为指定时区。
表达式类别: 日期时间(Datetime)
声明的参数¶
- 时区(Time zone): 目标时区。对于城市名称会考虑夏令时,但对于三位字母代码则不会。
TimeZone - 时间戳(Timestamp): 时间戳列。
Expression\
输出类型: Timestamp
示例¶
示例 1:基本情况¶
参数值:
- 时区: Australia/Sydney
- 时间戳: 2020-04-28T10:09:00Z
输出: 2020-04-28T20:09:00Z
示例 2:基本情况¶
参数值:
- 时区: EST
- 时间戳: 2020-04-28T10:09:00Z
输出: 2020-04-28T05:09:00Z
示例 3:基本情况¶
参数值:
- 时区: America/Denver
- 时间戳: 2020-04-28T10:09:00Z
输出: 2020-04-28T04:09:00Z
示例 4:基本情况¶
参数值:
- 时区: America/Denver
- 时间戳: 2020-02-09T10:09:00Z
输出: 2020-02-09T03:09:00Z
示例 5:基本情况¶
参数值:
- 时区: UTC
- 时间戳: 2020-04-28T10:09:00Z
输出: 2020-04-28T10:09:00Z
示例 6:基本情况¶
参数值:
- 时区: EST
- 时间戳: 2020-01-28T10:09:00Z
输出: 2020-01-28T05:09:00Z
示例 7:空值情况¶
参数值:
- 时区: UTC
- 时间戳: null
输出: null