Formatting Date in Google Calendar

Is there a way to set the timezone? Say for example I have the date: DD MMM hh:mm A and I want to say it is Australia/Hobart timezone without changing the timezone.

I use Get A Task for Asana to get the date which is outputted as follows:

Display Value:	22 October 2023 8:00 PM

Note how it doesn’t say any timezone. I have some client’s who would input this as Australia/Hobart while others would enter it as Australia/Brisbane. There is currently a 1hr different (Hobart is 1hr ahead) due to daylight savings.

When I make the API call to create the event:

 "start": {
    "dateTime": "{{7.custom_fields_collection.`1205563453570260`.display_value}}",
    "timeZone": "{{21.TimeZone}}"
  },
  "end": {
    "dateTime": "{{addHours(7.custom_fields_collection.`1205563453570260`.date_value.date_time; 1)}}",
    "timeZone": "{{21.TimeZone}}"

{{21.TimeZone}} = Australia/Hobart
As I want the event in that timezone and when I went through the create event calender module it would create it using my local system timezone which is Australia/Hobart. This is going to vary.

7.custom_fields_collection.1205563453570260.date_value.date_time = 22 October 2023 8:00 PM

Or whatever the set time is.

Output is as follows

kind:calendar#event
etag:"XXXXXXXXXX"
id:XXXXXXXXXXXXX
status:confirmed
htmlLink:https://www.google.com/calendar/eventeid=XXXXXXXXXXXXX
created:21 October 2023 8:42 PM
updated:21 October 2023 8:42 PM
summary:John Hobart - +6142345222
description:Phone: 0412345678
Address: 27 Maple Ct, Weatherfield
Appointment: 22 Oct 08:00 PM to 22 Oct 09:00 PM
Attendee: email@gmail.com
location:27 Maple Ct, Weatherfield
colorId:11
creatorCollection
email:calendar@domain.com.au
organizerCollection
email: XXXXXXXXX@group.calendar.google.com
displayName:Test Calendar
self:true
startCollection
dateTime:2023-10-22T21:00:00+11:00
timeZone:Australia/Hobart
endCollection
dateTime:2023-10-22T22:00:00+11:00
timeZone:Australia/Hobart
iCalUID:XXXXXXXXXXX@google.com
sequence:0
attendeesArray
1Collection
email:email@gmail.com
displayName:Levai XXXXX
responseStatus:needsAction
guestsCanModify:true
remindersCollection
useDefault:false
overridesArray
eventType:default

Which looks all good but when I go into the calendar it is showing this:

Which is the daylight-saving version of the time which should have already been accounted for.

Hopefully, this make sense with what I am trying to achieve.
Basically I want the calendar to show the correct timezone based on the timezone input I give it.
I am creating individual calendars for each user which is set to the appropriate timezone. In this example I have the timezone set to GMT+11. Any questions in regards to clarification please let me know. Thank you.

@samliew hoping you might be able to help me with this as you have with all my other issues i’ve ran into. I’ll have to pay you for your time with helping me. Been an absolute legend!

Hello again,

I’m travelling at the moment, so I won’t be able run anything from my phone.

Take a look at parseDate and formatDate functions, they accept an optional third parameter for timezone.