Actions132
- AI Actions
- Extract Text From Document
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Extract Entities
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate JavaScript Code
- Generate Python Code
- Detect Language
- Detect Mood
- Extract Text From PDF
- Recognize Objects in Image
- Extract Text From Image
- Redact Sensitive Information From PDF
- Remove Background Image
- Summarize Text
- Transcribe
- Translate Text
- Image Actions
- Business Actions
- Convert Actions
- Generate Actions
- Crypto Actions
- Operator Actions
- Storage Actions
- Scheduler Actions
- Text Actions
- Chart Actions
- Code Actions
- Calculate Actions
- Date and Time Actions
- PDF Actions
- Compress PDF File
- Count PDF Pages
- Create Empty PDF
- Decrypt PDF
- Convert DOCX to PDF
- Draw Image on PDF
- Draw Text on PDF
- Encrypt PDF
- Convert HTML to PDF
- Convert Markdown to PDF
- Manage PDF Metadata
- Merge PDF Files
- Add PDF Pages
- Remove PDF Pages
- Resize PDF Pages
- Rotate PDF Pages
- Convert PDF to Base64
- Convert PDF to Image
- Split PDF File
- Add Image Watermark to PDF
- Add Text Watermark to PDF
- Shortened URL Actions
Date and Time → Switch Time Zone
AI-generatedOverview
The "Switch Time Zone" operation in the Date and Time resource allows users to convert a given date and time from one time zone to another. This is particularly useful when working with data or events that originate from different geographical locations, ensuring consistent and accurate time representation across systems.
Common scenarios include:
- Converting timestamps from a user's local time zone to UTC for standardized storage.
- Displaying event times in the viewer's local time zone on a global application.
- Synchronizing schedules or logs coming from multiple time zones.
For example, converting "2023-01-01 12:00:00" from "America/New_York" to "Europe/Berlin" will adjust the time accordingly based on the time zone difference.
Properties
| Name | Meaning |
|---|---|
| Date/Time | The date and time string to be converted. Example format: "2023-01-01 12:00:00". |
| From Time Zone | The source time zone of the input date/time. Examples: "UTC", "America/New_York", "Europe/Berlin". |
| To Time Zone | The target time zone to convert the date/time into. Examples: "UTC", "America/New_York", "Europe/Berlin". |
Output
The node outputs a JSON object containing the converted date and time adjusted to the target time zone. The exact structure is not explicitly shown in the provided code, but typically it would include at least:
{
"convertedDateTime": "string"
}
where "convertedDateTime" is the date/time string after conversion.
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential to authenticate requests to the external service at
https://prod.0codekit.com. - The node sends a POST request to the endpoint
/dateandtime/switchtimezonewith the parametersdateTime,fromTimeZone, andtoTimeZonein the request body. - Proper configuration of the API key credential within n8n is necessary for successful execution.
Troubleshooting
- Invalid Time Zone Error: If the provided time zone strings are invalid or unrecognized, the API may return an error. Ensure time zones follow standard IANA time zone database names (e.g., "America/New_York").
- Incorrect Date Format: Providing a date/time string in an unsupported format might cause parsing errors. Use ISO-like formats such as "YYYY-MM-DD HH:mm:ss".
- Authentication Failures: Missing or incorrect API key credentials will prevent the node from connecting to the service.
- Network Issues: Connectivity problems to the external API endpoint can cause timeouts or failures.
To resolve these issues:
- Validate time zone inputs against known standards.
- Confirm date/time formatting matches expected patterns.
- Verify API key credentials are correctly set up in n8n.
- Check network connectivity and firewall settings.