44 views

Symptoms


CAB Workbench Meeting Notes timestamp issue. It shows one hour difference for few timezones.

Cause


This only happens to the users where the timezone is having day light savings.

It works fine for the rest of the timezones.

This is expected behavior for GlideTime to be daylight savings unaware.

Script Include responsible for adding notes in CAB modules is as below.

script include CABRuntimeStateSNC, line 72.

The last 2 parameters are GlideTime.getDisplayValue() and gs.getSession.getTimeZoneName().

The 2nd of these parameters is correct (the timezone) however the GlideTime.getDisplayValue() is what brings in the time

There's an easier way to reproduce in the background script:

  • Change the user to a timezone different than System and GMT
  • Go to "System Definition > Scripts - Background"
  • Copy and paste these lines:
    var dt = new GlideTime();
    gs.info(dt.getDisplayValue());
  • Run the script
  • The result displayed is not correct, it's 1 hour off.



Resolution


So the work around suggested is:
var dt = new GlideDateTime();
gs.info(dt.getLocalTime().getByFormat(""));

 


Since this is a expected behavior for the platform to be unaware of the day light savings and if you still want to go ahead and get the correct time of day light savings timezone, you might have to customize the script, with the above mentioned workaround.

Article Information

Last Updated:2018-10-08 23:05:22
Published:2018-10-09