Not able to convert timezone of selected date and time in scoped app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Everyone,
I'm working in a scoped application and facing an issue with time zone conversion.
I have two Date/Time fields:
Scheduled Date Time (user input)
CDT Date Time (target field)
Requirement:
When a user selects a value in the Scheduled Date Time field, I need to check the logged-in user's time zone.
If the user's time zone is one of the following:
US Central
US Pacific
US Mountain
IDT
Then I need to convert the selected Scheduled Date Time value to CDT (Central Daylight Time) and populate the second Date/Time field.
I'm trying to implement this using a client-callable Script Include and GlideDateTime APIs and client script. However, since this is a scoped application, methods such as setTZ() are not supported.
Has anyone implemented a similar requirement in a scoped app? What would be the recommended approach for converting a Date/Time value from the user's time zone to CDT and returning the converted value to the client?
Any guidance would be greatly appreciated.