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

DateTimes UTC on the server Local time in the browser

1 Answer 359 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 26 Jan 2018, 08:02 PM

Hello!  

I'm using the grid to display some LastUpdateDate which is saved as UTC in the database. I want to display this dates to the user in the local browser time zone in "g" general format based in the user settings. ex: "1/26/2018 14:15 PM". 

 

Date in the database: "2018-01-26 17:15:13.130" UTC

Local time in which the data was saved "2018-01-26 14:15:13" my local time 

What the grid displays: "1/26/2018 5:15 PM" Wrong!

 

Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 31 Jan 2018, 09:48 AM
Hello, Max,

As the dates handling in the Grid is very specific due to the JavaScript date objects specifics, we are recommend checking the following article describing the specifics and the different approaches which can be taken:

https://docs.telerik.com/kendo-ui/controls/data-management/grid/date-formats

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Max
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or