跳转至

Convert timestamp to UTC(将时间戳转换为 UTC(Convert timestamp to UTC))

Supported in: Batch, Faster, Streaming

Converts a timestamp to UTC based on a given time zone.

Expression categories: Datetime

Declared arguments

  • Time zone: Time zone that the current timestamp is recorded in.
    TimeZone
  • Timestamp: Timestamp column.
    Expression\

Output type: Timestamp

Examples

Example 1: Base case

Argument values:

  • Time zone: Europe/London
  • Timestamp: 2018-10-28T01:01:01Z

Output: 2018-10-28T00:01:01Z


Example 2: Base case

Argument values:

  • Time zone: Australia/Sydney
  • Timestamp: 2020-04-28T10:09:00Z

Output: 2020-04-28T00:09:00Z


Example 3: Base case

Argument values:

  • Time zone: EST
  • Timestamp: 2020-04-28T10:09:00Z

Output: 2020-04-28T15:09:00Z


Example 4: Base case

Argument values:

  • Time zone: Europe/London
  • Timestamp: 2026-03-29T01:01:01Z

Output: 2026-03-29T01:01:01Z


Example 5: Base case

Argument values:

  • Time zone: UTC
  • Timestamp: 2020-04-28T10:09:00Z

Output: 2020-04-28T10:09:00Z


Example 6: Null case

Argument values:

  • Time zone: UTC
  • Timestamp: null

Output: null



中文翻译


将时间戳转换为 UTC(Convert timestamp to UTC)

支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)

根据指定的时区将时间戳转换为 UTC 时间。

表达式类别: 日期时间(Datetime)

声明的参数

  • 时区(Time zone): 当前时间戳所记录的时区。
    TimeZone
  • 时间戳(Timestamp): 时间戳列。
    Expression\

输出类型: Timestamp

示例

示例 1:基本情况

参数值:

  • 时区: Europe/London
  • 时间戳: 2018-10-28T01:01:01Z

输出: 2018-10-28T00:01:01Z


示例 2:基本情况

参数值:

  • 时区: Australia/Sydney
  • 时间戳: 2020-04-28T10:09:00Z

输出: 2020-04-28T00:09:00Z


示例 3:基本情况

参数值:

  • 时区: EST
  • 时间戳: 2020-04-28T10:09:00Z

输出: 2020-04-28T15:09:00Z


示例 4:基本情况

参数值:

  • 时区: Europe/London
  • 时间戳: 2026-03-29T01:01:01Z

输出: 2026-03-29T01:01:01Z


示例 5:基本情况

参数值:

  • 时区: UTC
  • 时间戳: 2020-04-28T10:09:00Z

输出: 2020-04-28T10:09:00Z


示例 6:空值情况

参数值:

  • 时区: UTC
  • 时间戳: null

输出: null