Skip to main content

Hey guys,

 

When I tried to use APIs in Workflow Automator to enable manual update on due by field and then update ticket’s due by & first response by with value from custom datetime field using placeholder, the date time is not the same as the value I put in the custom datetime field.

 

Let say my time zone is set as GMT +8 (Hong Kong), when the custom datetime field is 2021-12-31 00:00, the ticket’s due by will be updated as 2021-12-31 08:00, which should be 2021-12-31 00:00.

 

I checked that the value from custom datetime field placeholder has the correct time zone information by just adding the placeholder value as note content, and it shows “Fri, 31 Dec, 2021 at 0:00 GMT +0800”. Please advise if I have done anything wrong.

Hi@roland.ng 
Good day!

Are you using Liquid Filters to ensure that the Custom Date Field in your Ticket Form is transformed to an acceptable API format? If I had to hazard a guess, this transformation is what is playing foul. 

Ex:

{
  "due_by": "{{ticket.end_date | date: '%Y-%m-%dT%H:%M:%S'}}"
}


If you use this Liquid Filter described above to transform the content, then the API call with use your Helpdesk’s default timezone while using the date field. 
Ensure your helpdesk’s timezone is also set as expected. 

References for Date Fields:

Input for date fields is expected to be in one of the following formats:

YYYY-MM-DD
YYYY-MM-DDTHH:MM
YYYY-MM-DDTHH:MMZ
YYYY-MM-DDTHH:MM:SS
YYYY-MM-DDTHH:MM:SSZ
YYYY-MM-DDTHH:MM:SS±hh:mm
YYYY-MM-DDTHH:MM:SS±hh
YYYY-MM-DDTHH:MM:SS±hhmm

If the time zone information is not present, it will be assumed to be in UTC.
( some valid datefields : 2016-02-15T21:16:25Z, 2012-12-24T12:56:15+05:30, 2010-03-23T12:00 )
For more details on date format: ISO 8601


Reply