Skip to main content

Convert Timezone

Uncontrolled node

Overview

The Convert Timezone node converts date and time values between different timezones. It parses an input date string from a specified source timezone, converts it to a target timezone, and outputs the result in a chosen format. This is useful for scheduling events across timezones, displaying local times to users in different regions, or standardizing timestamps in your workflow.

The node uses strict parsing to ensure the input matches the expected format exactly, and supports a wide range of date/time formats including ISO 8601, Unix timestamps, and various regional formats.

Supported Formats

The node supports the following input and output formats:

FormatDescriptionExample
YYYY-MM-DDISO date only2025-01-15
YYYY-MM-DD HH:mm:ssISO datetime with space2025-01-15 14:30:00
YYYY-MM-DDTHH:mm:ssISO datetime with T2025-01-15T14:30:00
HH:mm:ssTime only14:30:00
MM/DD/YYYYUS date format01/15/2025
DD/MM/YYYYEuropean date format15/01/2025
YYYYMMDDCompact date20250115
YYYYMMDDHHmmssCompact datetime20250115143000
YYYY-MMYear and month2025-01
YYYYYear only2025
DD MMM YYYYDay abbreviated month15 Jan 2025
MMM DD, YYYYAbbreviated month dayJan 15, 2025
DD MMMM YYYYDay full month15 January 2025
MMMM DD, YYYYFull month dayJanuary 15, 2025
ISOISO 8601 format2025-01-15T14:30:00Z
timestampUnix timestamp (ms)1705326600000
timestamp_sUnix timestamp (seconds)1705326600

Timezones

The node accepts standard IANA timezone identifiers including:

  • UTC (Coordinated Universal Time)
  • America/New_York, America/Chicago, America/Denver, America/Los_Angeles (US timezones)
  • Europe/London, Europe/Paris, Europe/Berlin (European timezones)
  • Asia/Tokyo, Asia/Shanghai, Asia/Dubai (Asian timezones)
  • Australia/Sydney, Pacific/Auckland (Pacific timezones)

Inputs

InputTypeDescriptionDefault
InputTextThe date/time string to convert. Must match the specified input format exactly.-
From TimezoneEnumThe timezone of the input date/time (e.g., America/New_York).Local system timezone
To TimezoneEnumThe target timezone to convert to (e.g., Europe/London).Local system timezone
Input FormatEnumThe format of the input string. Select from the supported formats table above.YYYY-MM-DD HH:mm:ss
Output FormatEnumThe desired format for the output string. Select from the supported formats table above.YYYY-MM-DD HH:mm:ss

Outputs

OutputTypeDescription
OutputTextThe converted date/time string in the target timezone and specified output format. Returns an error object if parsing fails.

Runtime Behavior and Defaults

  • Uncontrolled Operation: This node runs automatically whenever its inputs change. It does not require a run event trigger.
  • Strict Parsing: The input string must exactly match the selected input format. If the format doesn't match, the node outputs an error object with details about the parsing failure.
  • Timezone Defaults: If no timezone is specified, the node defaults to the local system timezone of the runtime environment.
  • Timestamp Handling: When using timestamp or timestamp_s formats, the input should be a numeric value (or numeric string) representing milliseconds or seconds since Unix epoch.
  • Date-Only Inputs: When using date-only formats (like YYYY-MM-DD), the time component is assumed to be midnight (00:00:00) in the source timezone.

Example Usage

Scenario: Converting a meeting time from New York to London.

  1. Set Input to: 2025-03-15 09:00:00
  2. Set From Timezone to: America/New_York
  3. Set To Timezone to: Europe/London
  4. Set Input Format to: YYYY-MM-DD HH:mm:ss
  5. Set Output Format to: YYYY-MM-DD HH:mm:ss

Result: The output will be 2025-03-15 14:00:00 (assuming standard time; during daylight saving time, the offset may vary).

Alternative with ISO Output:

  • Set Output Format to: ISO
  • Result: 2025-03-15T14:00:00+00:00 (or appropriate timezone offset)

Error Handling: If you provide an input like 15/03/2025 but set Input Format to MM/DD/YYYY, the node will output:

{
"error": "Could not parse input with inputFormat \"MM/DD/YYYY\": Expected MM/DD/YYYY"
}