Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    [bug?] Cannot set timezone by calling DateUtil.setDefaultDisplayTimezone()

    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
    Developing applications with Smart GWT, the Google Web Toolkit edition of SmartClient

    #2
    Hi taurus,

    I strongly assume that SmartGWT is not involved in date.toString()-execution. Try e.g. a ClientOnly DataSource with a date field and load that DataSource to some DataBoundComponent.

    Best regards
    Blama

    Comment

    Working...
    X