Mastering Timezone Conversion on Make.com: A Comprehensive Guide to UTC to Specific Timezone Conversion
Hey there, Make.com users! Today, we're going to tackle a common problem that many of you might have encountered: converting a received UTC time to a specific timezone. This can be a bit tricky, especially if you're dealing with different timezones and daylight savings. But don't worry, we've got a solution for you!
The Problem
Let's say you have a scenario where you receive a time in UTC format. You need to use this data to send an email to notify users about a new meeting. However, the time is in UTC and you need to convert it to a specific timezone, say Asia/Jerusalem. The problem is, if you try to convert the date using the FormatDate function, it doesn't work because your Make.com timezone is set to Jerusalem/Asia. So, you need a way to convert this data from UTC to Asia/Jerusalem.
The Solution
After some research and testing, we found a solution that works. Here's a step-by-step guide:
- First, you need to use the addHours function to add the necessary hours to the timestamp. This will convert the UTC time to your desired timezone.
- However, this solution doesn't account for daylight savings. To solve this, you can use the Time API (https://timeapi.io/swagger/index.html).
- Add an HTTPS module doing a POST with the application/json using the date and time, original timezone (UTC), and the destination timezone (Asia/Jerusalem).
- The results need to be formatted back, but once you've done that, it should work perfectly.
Troubleshooting Tips
If you're still having trouble with the conversion, here are a few tips:
- Make sure you're using the correct timezone in the Time API. The timezone should be in the format "Continent/City", like "Asia/Jerusalem".
- Check your HTTPS module settings. Make sure you're doing a POST and using the application/json.
- Don't forget to format the results back after you get them from the Time API.
Conclusion
Converting a received UTC time to a specific timezone can be a bit tricky, especially when you have to account for daylight savings. But with the right tools and steps, it's definitely doable. We hope this guide has been helpful for you. Remember, if you're still having trouble, don't hesitate to ask for help. The Make.com community is always here to support you!
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.