Announcement

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

    Questions concerning the DST

    Hi Isomorphic,

    I have two questions concerning SmartGWT and DST.

    #1) DateUtil.setAdjustForDST
    Note that setting this flag to true will have no effect unless you are in a locale that is observing Daylight Saving Time this year;
    I use gwt.xml with no locale information.
    Is there a method to get the locale detected by SmartGWT from browser ?
    Is there a method to know if the DST will be applyed by SmartGWT based on the locale it detected ?

    #2) DateUtil.setDefaultDisplayTimezone
    If I am in Europe/Paris timezone (GMT+1) and in a period observing the DST like this month august when it is GMT+2,
    What would be the right set up for SmartGWT
    2.1) that i am currently using
    DateUtil.setDefaultDisplayTimezone("+01:00");
    DateUtil.setAdjustForDST(true);
    or
    2.2)
    DateUtil.setDefaultDisplayTimezone("+02:00");
    DateUtil.setAdjustForDST(true);


    Best regards,
    Costy

    #2
    Hi costy,

    I think this is all GWT related. You can use LocaleInfo.getCurrentLocale() etc. TimeZone has information on DST. I don't think the lookup Locale->TimeZone is possible automatically, especially as there are languages spoken in many countries (en-gb, en-us, ...) and countries with many TimeZones (en-us with EDT, CDT, PDT etc.).

    Best regards
    Blama

    Comment


      #3
      Hi Blama,

      Thank you for your responses for question 1).
      My question is more how SmartGWT is dealing with them.
      SmartGWT will ignore or use the DST flag based on which GWT method ?

      That's the problem, we can not give the user timezone but more like on offset and a DST flag to be used which can be ignored.
      One again, if i go in holidays on a different timezone with no DST, computer automatically adjust the timezone based on location.
      Once connected to my app, if I create events it will ignore the DST, even my user timezone is Europe/Paris (GMT+1 + DST)


      Isomorphic or Blama, may i have the answer to the question 2) ?
      After lots of testing, looks like the 2.2 is the answer.
      Can someone confirm ? The docs are not clear on the use.


      Best regards,
      Costy

      Comment


        #4
        Hi Isomorphic,

        May i have the answer to the question 2) ?

        #2) DateUtil.setDefaultDisplayTimezone

        If I am in Europe/Paris timezone (GMT+1)
        What would be the right set up for my SmartGWT app, when it starts in august (when it is GMT+2) .
        2.1)
        DateUtil.setDefaultDisplayTimezone("+01:00");
        DateUtil.setAdjustForDST(true);
        or
        2.2)
        DateUtil.setDefaultDisplayTimezone("+02:00");
        DateUtil.setAdjustForDST(true);


        Best regards,
        Costy

        Comment


          #5
          hi costy ,

          Your option 2.1 should be the correct one

          regards

          Isomorphic Support

          Comment


            #6
            Thank you Isomorphic for your quick reply.

            The logic setting would be 2.1, i agree, but the calendar is sending a wrong value to the server.
            2.1 is our actual setting, but after lots of testing, we found that the calendar is working correctly with option 2.2.
            The docs are not clear on that.

            Comment


              #7
              adjustForDST is an attribute which affects client-side date-formatting in FormItems and similar - it isn't related to our Calendar widget, per se, and doesn't affect values sent to the server.

              Comment

              Working...
              X