European Data on WhatsApp Message

Dear community, I have a problem with a data field.
Im tryng to send a message when a user register himself in a course via FluentBooking. I have already set the webhook and the message from WhatsApp is ok.

My problem is to set the correct data of these courses on the wz message. The first problem is, the data is -2 hours before and I have to add 2 hours. The second thing is to set data on european view DD/MM/YYYY

After a several tentative the result is a strange data like this: 2024-10-23T12:00:000Z

Im trying several times, but i cant find a solution.





Hey there,

what is the incoming format? Maybe you need to use the parseDate() function first to turn it into a Date object. Also you can combine the functions together, no need to be separate Tool modules.

I have attach a screenshot
I have tried with parseDate() but something goes wrong…
The filed that interest me is start_time

Screenshot 2024-09-25 alle 11.11.10

What goes wrong when you try to parse the date?

The result is this string on the WhatsApp message: 2024-10-23T12:00:000Z

Hey atech_marketing

Don’t want to highjack the reply from Stoyan, but since some times has passed I want to coin in on an explanation and a possible solution.

Solution maybee :slight_smile:
From what you shown, I tried to make two versions of solutions (at the bottom of the scenario), hopping one of the is the correct one. :+1:

Scenario
I have created a scenario, that shows how time format, parseDate and formatDate works including timezones.
You will find the scenario below.
TimeZone.json (54.9 KB)

Timezones and Make.com
When working with timezones in Make, timezone parsed with no specification in the date object of a response e.g. 2024-12-24T14:00:00.000-05:00, here -05:00 being EST, will be interpret as a local timezone.
Here the important is that Make uses different timezones for users (you) and your Make organization. Interpret dates will always follow the organization e.g. for most of us I guess that the same as our local time.
See more here: Time Zones

This text you can find in the notes for the scenario.
Time parsed or coming from a request is considered as your local time, unless the formatting states otherwise.
In this case I am parsing two times:
First date parsed is according to the ISO 8601 (YYYY-MM-DDTHH:mm:ss.sss-“timezone”), the timezone here is -05:00 equal to EST (Eastern Standard Time) and is parsed as a DATE object.
Second “date” parsed is a text representation of a time, that does not follow a standard i.e. it is parsed as a TEXT object.

ISO8601
Link to ISO8601

Make.com links
formatDate:
formatDate - Make.com Documentation

Tokens for formatting:
Tokens Formatting - Make.com Documentation

parseDate:
parseDate - Make.com Documentation

Tokens for parsing:
Tokens Parsing - Make.com Documentation

Thanks for your reply! I tried several times but there is something thant doesnt work…
The user fill a form, the form is set Europe/Rome, same for Make setting.

The data from the webhook is: 2024-10-23 12:00:00 but in the form the hour is not correct, its 14:00:00, this is the first problem.

This is what i do:

  1. Take the data 2024-10-23 12:00:00 and parse DD.MM.YYYY HH:mm
  2. After I take the parse data and change the format in italian format and the result is 23/10/2024 12:00:00. When i send a message the info is correct.
  3. The problem is now, when I have to correct the time, because I don’t know why but the times that I have to show on the wz message is +2 hours. I set another variable with AddHours 2 and the result is this: 2024-10-23T12:00:000Z.

I cant find a solution, of I think im wrong something…

FIND A SOLUTION (but I think is not correct)
When I use formatdate, I place a +4 timezones Asia/Dubai. Now the time is correct, but I think its not the right solution to have a correct hours…

Hey Atech

Could you check FluentBooking and the timezone for your availability schedule?

By any chance, is your timezone setting different, would explain the 4 hour time different.
Please tell if it is different from your local time.

We are both in the same timezone and I guess you user summer time also?

The Asia/Dubai timezone kinda make sense.

My thoughts:

E.g. If you book you schedule for 12:00 the FluentBooking either sends the data to the webhhook in regards to a timezone you set for your schedule or they send the time as thier normal time (+04:00). That makes sence, since the software company servers or they, themself is in that timezone.

Now what happens is, the date and time is send to make either formated by a timezone formated by you or by their own timezone.
From your screenshot it looks like the booking with ID: 79 is the date and timezone comming out of FluentBookings, correct?

Then you manipulate the data and send it off to WhatsApp, I don’t know if/what is send and done to the WhatsApp module, the data Variable?

Anyway, since the timezone is included in the data from FB, I would do this.

formatDate([1. Booking: start_time] ; DD/MM/YY HH:mm:ss;[1. Booking: person_time_zone])

The remove the add hour variable.

And look into Whatsapp Api what date/time it expect and/or if it also needs or can tke a timezone.
My thought here, if the 12:00 is the right time for the booking and for your current time.

Then it might be whatsapp that simply thinks that it gets the time in GMT or GMT-2 and your are sending it in GMT+2 = 2024-10-23T12:00:000Z
The Z is equal to UTC = GMT = 00:00, both summer and winter.

Europe/Rome in the TZ format is +01:00 winter and +02:00 summer.

So the adfing of anything to you time will make it worse. This is a timezone and format problem in combination with 3 systems (FB - Make - WApp) that is causing this.

So in short, format the time as written, so you allways se the right time comming out of FB from a make perspective.
Check timezones for FB and how/what timezone WA wants it in, if any.

Hope this helps

/Riko