This is a migrated thread and some comments may be shown as answers.

Date type field is displayed with +2 hours

2 Answers 27 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Calin
Top achievements
Rank 1
Calin asked on 13 Apr 2017, 08:50 AM

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 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 13 Apr 2017, 01:50 PM

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.
 
0
Calin
Top achievements
Rank 1
answered on 13 Apr 2017, 04:01 PM

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". 

Tags
General Discussion
Asked by
Calin
Top achievements
Rank 1
Answers by
Martin
Telerik team
Calin
Top achievements
Rank 1
Share this question
or