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

Is it possible to specify that dates should not be changed to local time before being displayed?

1 Answer 22 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 15 Jan 2014, 12:35 AM
Hello,

We are using the MVC wrapper to create a grid that contains a column with a date in it.

The date is stored in UTC, and we would like to display it in UTC.

For most browsers, simply binding to the column and specifying a format string of "MM/dd/yyyy" works fine, but on the iPad the date is being converted to the local time zone instead. We are using remote data binding.

After searching around, I came across this:

http://www.kendoui.com/code-library/mvc/grid/using-utc-time-on-both-client-and-server-sides.aspx

Which suggests that there is no work around other than to add the client-side javascript to convert the date back to it's original time zone. I am just posting this message to confirm that this is still the case (since that project is over a year old).

Thanks,
--Dan

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 16 Jan 2014, 09:35 AM
Hi Dan,

Yes, this is still the recommended way of handling dates. Basically all Date object in JavaScript are created with a timezone offset (taken from the OS clock) and since this is the standard browser behavior there is not much we can do about it.

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Dan
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or