How do I get these dates to format properly in Make as they appear in my Google Calendar?

Hi guys I am trying to retrieve the busy sections on a particular date from my Google Calendar and when I run my GC module it returns the date and busy time slots as expected.

As you can see it is returning 2 busy slots, 10:00am-11:00am and 12:30pm-13:30pm

My issue is now when I try to transform this information to JSON the hours time slots are pushed an hour forward and I’m not sure how to combat this.

I am passing the object of busy time slots to the transform to JSOn module and it gives me a string of busy slots but these are the slots it gives me.

As you can see the time slots it is now returning are from 9:00am-10:00am and from 11:30am-12:30pm and hour earlier than the Google Calendar busy slots.

I assume this has something to do with the timezones but how do I combat this and ensure the JSON matches the times that the Google Calendar has?

Thanks in advance

It might have to do with timezones. Have you tried changing the timezones in your organization’s profile to see if anything changes? Or the timezones in your Google Calendar the same as the execution timzone for your organization?

L

Yeah I changed the timezones in both to be UK but I think Make just uses UTC as standard. What I did instead was this:

iterated through the array of dates that the google calendar node returns, then I set variables of start_local and end_local. I used the formatDate() function to then format them in my timezone and then used an array aggregator to turn into an array of booked slots with their local start and end times.

3 Likes