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

    What would be the SmartGWT Calendar expected behaviour

    Hi Isomorphic,

    From server side, I am sending a date time at 9:00 GMT.
    I set DateUtil.setDefaultDisplayTimezone("+2:00") and DateUtil.setAdjustForDST(false);
    I am using my laptop in holiday, that moves automatically lets say to GMT+4.

    When i show the CalendarEvent, what should be the expected behaviour
    - to show the event at 13:00 (GMT+4), the browser/computer offset or
    - to show the event at 11:00 (GMT+2) the DateUtil offset ?

    Best regards,

    We're not sure what this question means - when you set the display timezone, then that is the display timezone, it is the timezone in which dates will be displayed. That's the point of the API, and how it is documented.

    If you're not seeing this, then you are probably delivering dates incorrectly in some way - see the Date and Time Format and Storage overview.


      I got the timeline resolution set to one day every hour (like the screenshot below from showcase).

      The hours presented on the timeline below are in which timezone ?
      - GMT+4, the browser/computer offset or
      - GMT+2 the DateUtil offset ?

      In my example, the event is shown at 13:00 (GMT+4) on he timeline, but the hover is shown at 11:00 (GMT+2).
      It look like hours of the timeline is based on the browser one and not the one from dateUtil.

      Click image for larger version

Name:	timeline.png
Views:	67
Size:	50.7 KB
ID:	268509

      Attached Files


        Here is a real example : user with London timezone (GMT) and computer with GMT+3.
        The event in database starts at 6:00 GMT.

        In console, i logged the DateUtil.setDefaultDisplayTimezone which is "+00:00".
        The computer logged in browser console the event startTime at 9:00(GMT+3) : it is normal.
        The hover is a simple format of the date it is good

        And the problem is hours on timeline headers, event is positioned at 9:00 (Computer timezone) and not at 6:00, the timezone from DateUtil.setDefaultDisplayTimezone.

        Click image for larger version

Name:	timeline2.png
Views:	51
Size:	65.9 KB
ID:	268516

        Like Google Agenda, it is using the user timezone for hours in calendar, not the one of the computer.
        Here is the user timezone GMT+2, not the computer one GMT+3.
        Click image for larger version

Name:	googleAgenda.png
Views:	88
Size:	28.2 KB
ID:	268517

        How can I force the timezone for the hours of the timeline in resolution one day every hour ?
        Attached Files


          Hi Isomorphic,

          I found a way to put in evidence the issue.
          The timezone is applyed correctly for formatting datetimes, entering datetimes, calendar but not for timelines.

          First of all i am using the last stable build SmartClient Version: v13.0p_2022-08-23/LGPL Development Only (built 2022-08-23)

          I have an event that starts at 9:00 GMT.
          I have a user in Asia/Jakarta (GMT+7) and set DateUtil.setDefaultDisplayTimezone to "+07:00".
          My computer is GMT+3.

          Here is how the event is shown on the calendar (as expected at 9+7=16:00)

          Click image for larger version

Name:	calendar1.png
Views:	77
Size:	102.2 KB
ID:	268524

          Here is how the same event is shown on the timeline (NOT as expected, it is at 9+3=12:00, computer timezone)
          But the hover, datetime formatting, is working as expected.

          Click image for larger version

Name:	timeline1.png
Views:	47
Size:	40.7 KB
ID:	268525

          Do you think is a timeline issue or am i doing something wrong ?


            Thanks for the additional information - we're looking into this and will update here when we have more information.


              Hi Isomorphic,

              Do you have an update on this one? I am having the same issue with the Timeline.

              The Timeline start date and the event start/end dates use the browser's timezone, however, the event hover formats the start/end date based on the value set for DateUtil.setDefaultDisplayTimezone().

              I'm using SmartClient Version: v12.1p_2023-01-31/Pro Deployment (built 2023-01-31).

              Last edited by stonebranch3; 1 Feb 2023, 11:41.


                Unfortunately, display-timezones are not fully functional in Timelines in any current version - it *is* assigned to be looked into, but we'll hoist it up the queue and update here shortly when we have more information.