0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

Date & Time → Switch Time Zone

AI-generated

Overview

This node operation switches a given input time from one time zone to another. It is useful for workflows that need to convert timestamps between different time zones, such as scheduling events, logging activities, or displaying times to users in their local time zones. For example, converting a meeting time from UTC to Eastern Time or adjusting timestamps in logs to a specific regional time zone.

Use Case Examples

  1. Convert '2024-06-01T12:00:00' from UTC to America/New_York time zone.
  2. Adjust a timestamp from Europe/London to Asia/Tokyo for reporting purposes.

Properties

Name Meaning
Code Variables Allows defining multiple code variables with names and values to be used in the code editor for the selected function.
Input Time The time value to be converted from the input time zone.
Input Time Zone The time zone of the input time value.
Destination Time Zone The target time zone to convert the input time to.
Format Pattern Optional format pattern to specify the output format of the converted time.

Output

JSON

  • convertedTime - The time converted to the destination time zone formatted according to the specified pattern.

Dependencies

  • An API key credential for the 0CodeKit service is required to perform the time zone conversion.

Troubleshooting

  • Ensure the input time and time zones are valid and correctly formatted to avoid conversion errors.
  • If the API key credential is missing or invalid, the node will fail to authenticate and perform the operation.
  • Incorrect format patterns may result in unexpected output formats or errors.

Links

  • 0CodeKit Node Documentation - Official documentation for the 0CodeKit node in n8n, which includes the Date & Time resource and Switch Time Zone operation.

Discussion