Grid: Formatting dates and times in timezones other than users'

1 Answer 27 Views
Grid Localization
Eric
Top achievements
Rank 1
Eric asked on 15 Dec 2023, 06:03 PM | edited on 18 Dec 2023, 11:53 AM

Is there not a way to instruct the Grid to format dates and times in another timezone other than the browser's timezone?

For example, if you consider the example at example you'll see that the date of '2020-01-01T18:45' is formatted as 'Wed Jan 01 2020 18:45:00 GMT-0500 (Eastern Standard Time)' because I am in the EST timezone.  This is great. 

But what if I want it formatted in the PST timezone?

For example, if the date string provided is '2020-01-01T18:45-08:00', the formatted date in the example is 'Wed Jan 01 2020 21:45:00 GMT-0500 (Eastern Standard Time)' which is correct.  But how do I get the Grid to render 'Wed Jan 01 2020 18:45:00 GMT-0800 (Pacific Standard Time)'.

 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 20 Dec 2023, 11:13 AM

Hello,

You can use the kendo.timezone.apply method to apply a particular timezone to the dates.

https://docs.telerik.com/kendo-ui/api/javascript/timezone/methods/apply

And in the Dojo linked here you will find an example where a timezone is applied in a Grid template: - https://dojo.telerik.com/@NeliKondova/ipeQITAs

Regards,
Neli
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Grid Localization
Asked by
Eric
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or