Is there a way to manually set a specific time zone for Date Time Fields in Service Catalog or pick up the end user's time zone? The date time field apparently converts the value to UTC in SC. We are pulling form values in through PAM and then passing this information to a third party ticketing system.
**To be more clear, the issue is that the value users enter on the Service Catalog form is not what PAM is pulling in. Apparently Service Catalog converts this date prior to PAM pulling it in. While we can resolve the issue with JS in the PAM operator, we were hoping there was an OOTB option to set the time zone on the SC side of the house.
If this is covered in detail anywhere, I would appreciate a link to it.I wasn't able to find any recent discussions or articles on this topic
Edited for clarity*
You could use the timezone in the contact record (usp_contact table).
Thank you for the suggestion. Unfortunately we do not use Service Desk. We're using Process Automation to pull the form values and then pass the information to a third party ticketing system.
To be more clear, my issue is that the value users enter on the Service Catalog form is not what PAM is pulling in. Apparently Service Catalog converts this date prior to PAM pulling it in. I could resolve the issue with JS in the PAM operator, but I was hoping there was a more OOTB option for this on the SC side of the house.
You don't have to have Service Desk. You can edit Users' Timezone right om the Service Catalog interface (Administration tab, Users link). You can retrieve this information via web service in PAM.
First, I want to apologize for the delay in responding to this.
Ideally, I'd like to resolve this issue at the form level in SC. Is there any way to prevent SC from converting time to UTC? If I'm going to hard code time conversion in PAM, your solution is going to work well. I'd really like to avoid that if possible.
Thanks again for taking the time to provide a solution.
None that I know. You would find that most systems that record a time stamp do this to take into consideration time zone differences. I know that is not useful if your organization operates in a single geographic place.
Here's a work around that I implemented in PAM that you maybe able to move into Catalog using the script box on the form. It accepts a date passed in human readable format and converts it to unix time to be passed into SD. I don't know which format your other system uses so this may require some tweaking.
To use this in the form you'd need to use the ca_fdGetDateFieldValue function (in the onChange attribute) to retrieve the fields values and pass them into your function in the script box.
//converts Unix timestamps passed in from catalog to the proper time zone.
var date = new Date(dateVal).getTime(); //convert the human readable format to Unix time
var toEpoch = date.toString().substring(0, 10); //convert the date to string to get a substring of it(eliminating the JS milliseconds)