Date type field is displayed with +2 hours

Thread is closed for posting
3 posts, 0 answers
  1. Calin
    Calin avatar
    11 posts
    Member since:
    Feb 2016

    Posted 13 Apr 2017 Link to this post

    Hello,

    I want to make a remark regarding a display issueI see in the Telerik Platform website when displaying the contents or a record.
    For example make a REST call to update the field of a record. The body of my request is
    {
       "$set": {"End": "2017-04-13T10:29:00.000Z" }
    }
    In the database the field "End" is correctly saved as:
    {
      "Result": {
        "Public": false,
        "Overwrite": false,
        "Start": "2017-04-05T12:00:00.000Z",
        "End": "2017-04-13T10:29:00.000Z",
        "FriendlyLocation": "",
        "CreatedAt": "2017-04-13T07:53:46.812Z",
        "ModifiedAt": "2017-04-13T08:30:01.573Z",
        "Id": "52c947c0-201e-11e7-a280-5393f2b9b64a"
      }
    }
    but when I look of that object in the web interface I see it's displayed with +2 hours
    (see attached screenshot)

    Could you please see explain this issue and if this will be fixed in the future?

    Thank you,

    Calin Crecea

  2. Martin
    Admin
    Martin avatar
    104 posts

    Posted 13 Apr 2017 Link to this post

    Hi Callin,

    In the used Date-Time format the specified time zone is UTC, defined with a capital letter Z (without any offset):

    2017-04-13T10:29:00.000Z

    The date-time values are saved on the server in UTC time, but viewed in Telerik Portal in your local time zone - in your case UTC +2 offset.

    If you want to modify the time relative to UTC, remove the Z and add +HH:MM or -HH:MM instead:
    2017-04-13T10:29:00.000+02:00

    This will be saved on the server:
    2017-04-13T08:29:00.000Z

    but will be shown in the Portal:
    Apr 13, 2017, 10:29AM


    Indeed it is not clear that Telerik Portal is viewing the date-time data in your current time zone, therefore I have logged an issue on the matter.

    I hope this has helped.

    Regards,
    Martin
    Telerik by Progress
     
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
     
  3. Calin
    Calin avatar
    11 posts
    Member since:
    Feb 2016

    Posted 13 Apr 2017 in reply to Martin Link to this post

    Thanks for the reponse.

    That's ok, I don't see any issue, all fields in database are in UTC
    and the UI shows all in local time
    Created At, Modofied At, and my field End.

    To make it clearer, maybe you could add some text to say that the time is shown in "local time". 

Back to Top