Web Service Post string parameter is being passed with wrong time

I have a Web Service Method that is Posting to the tickets endpoint to create a ticket in another ticketing application.

In the header, Content-type is being set to application/json.

There are parameters set to hold the values from two datetime custom attributes from the original ticket. If these values are passed into UTC Datetime parameter to pass to the new ticket's custom attribute, or if they're passed from the original ticket in to string parms to be added to the Description in the new ticket, the time being passed is off. Obviously the UTC will be five hours off (we're in Central) but when TDX passess through a datetime parameter into a datetime custom attribute, 12n becomes 1 o'clock. 

Any suggestions about  how to make a datetime value of noon in an original ticket be noon in the ticket being created with the call?

Tags API webservice json
Asked by Scott Williamson on Wed 7/12/23 4:25 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Fri 7/14/23 10:57 AM

Hello Scott,

I know it does pull the date/time value in UTC, which *is* accurate. Also, in the past we have recommended to use UTC or make another call to format the date the way it is needed, then take that call's result to input to your PATCH call or whichever it is.

No feedback
Sure, it's accurate, but I maintain that it's still wrong because it's not in the local time of the technicians getting the ticket with that datetime. Both things can be true.

How does one make a call to pull in a datetime and then change that datetime to a given time zone - without iPaaS?
- Scott Williamson Fri 7/14/23 11:43 AM
It would definitely have to be done by some non-TDX system like maybe an Azure function that can grab that info and return it to a TDX workflow, or another application that can do the same for you which has an API endpoint. - Mark Sayers Fri 7/14/23 11:54 AM
Figured. I think our workaround is going to be accepting the event date and setup/tear-down datetimes for Facilities in another section of the form and then accepting a (unvalidated) string for an IT/AV setup time and passing that to the AV request ticket.

Thanks for the info!
- Scott Williamson Fri 7/14/23 12:07 PM
You are very welcome! - Mark Sayers Fri 7/14/23 12:09 PM