Convert any Timezone to IST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2022 09:43 PM
we have a script where we are converting any timezone to IST . Which is working fine when we run using background- script but does not work when using script include.
Below is the script reference
Converttimezone: function(updated) {
var session = gs.getSession();
var zoneName = session.getTimeZoneName();
var expectedTimezoneDateTime = new GlideScheduleDateTime(updated).convertTimeZone(zoneName, "IST");
var convertedTimeZoneDateTime = new GlideDateTime(expectedTimezoneDateTime);
return convertedTimeZoneDateTime;
},
Thanks&Regards
VenkatReddy M

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2022 09:51 PM
The current session time zone may differ from the time of the parameter "updated" hence there may be some difference.
Regards
Vinayak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 12:40 AM
sorry vinayak I didn't get you can you explain it briefly