I use Timeline, and i see time shifting where timezone on the cliend does not correspond to the servers's timezone. To avoid this, i use DateUtil.setDefaultDisplayTimezone, as described in the topic below, but it seems as not-working.
Here is my test code:
public void onModuleLoad() {
Date date = new Date();
SC.logWarn(date.toString());
DateUtil.setDefaultDisplayTimezone("+04:00");
SC.logWarn(date.toString());
DateUtil.setDefaultDisplayTimezone("+05:00");
DateUtil.setAdjustForDST(false);
SC.logWarn(date.toString());
And console output:
15:24:15.067:WARN:Log:Mon Mar 06 15:24:15 GMT+300 2017
15:24:15.067:WARN:Log:Mon Mar 06 15:24:15 GMT+300 2017
15:24:15.067:WARN:Log:Mon Mar 06 15:24:15 GMT+300 2017
Timezone is the same, it's not changing.
Or there is a different method to set the time zone for Timeline?
I use SmartClient Version: v11.0p_2017-02-27/EVAL
Here is my test code:
public void onModuleLoad() {
Date date = new Date();
SC.logWarn(date.toString());
DateUtil.setDefaultDisplayTimezone("+04:00");
SC.logWarn(date.toString());
DateUtil.setDefaultDisplayTimezone("+05:00");
DateUtil.setAdjustForDST(false);
SC.logWarn(date.toString());
And console output:
15:24:15.067:WARN:Log:Mon Mar 06 15:24:15 GMT+300 2017
15:24:15.067:WARN:Log:Mon Mar 06 15:24:15 GMT+300 2017
15:24:15.067:WARN:Log:Mon Mar 06 15:24:15 GMT+300 2017
Timezone is the same, it's not changing.
Or there is a different method to set the time zone for Timeline?
I use SmartClient Version: v11.0p_2017-02-27/EVAL
Comment