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

Convert utc server date to local time

4 Answers 1271 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gregory
Top achievements
Rank 1
Gregory asked on 03 Sep 2015, 10:33 PM
Anyone know how I can display a utc date/time I'm getting from my server as the user's local time? I'm putting this date/time in a ClientRowTemplate if that matters. 

4 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 07 Sep 2015, 08:00 AM
Hi Gregory,

Please refer to our Using UTC time on both the client and the server article that shows how to implement such functionality.

Regards,
Radoslav
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Gregory
Top achievements
Rank 1
answered on 08 Sep 2015, 07:04 PM
I think I found the right way to format my date. However, I'm having an issue with the ClientRowTemplate not running again on grid.refresh() it seems to only run my date formatting method when the data is read from the datasource again. Any ideas why grid.refresh() doesn't seem to run my ClientRowTemplate again or have a work around?
0
Gregory
Top achievements
Rank 1
answered on 08 Sep 2015, 07:09 PM
Sorry, spoke too soon.​ Refresh does run my ClientRowTemplate again. However. my dates aren't getting formatted to local time after a refresh tho. I'll keep digging. Thank you for your time. Still researching!
0
Radoslav
Telerik team
answered on 09 Sep 2015, 07:55 AM
Hello Gregory,

If you have problems with formatting dates you can check the following help article which shows the possible options to format a date with kendo api:
http://docs.telerik.com/kendo-ui/framework/globalization/dateformatting

Regards,
Radoslav
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Gregory
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Gregory
Top achievements
Rank 1
Share this question
or