Displaying Date Time with Daylight savings time

How are people getting date times to display with appropriate time zones? Our specific need is to display datetime fields on datagrids with EST or EDT (Eastern Standard Time) or (Eastern Daylight Savings Time) depending on what time of year it is.

Typically, I would expect to use the Moment.js libraries to accomplish this task, but I've had no luck importing that library into my Radzen application.

Has anyone come up with a solution for timezone display?

Hi @leyunker,

The Angular date pipe provides support for timezones. You can use it in Radzen.

I understand that Angular supports timezones but my question was specific to dealing with daylight savings time. If I hardcode everything with:

{{todayDate | date:'short':'EST'}}

Then the date will display correctly from sometime in the first few weeks of November through sometime mid-March. After that, EDT (daylight savings time) kicks in and all of my times will be off by 1 hour until we return to EST the following November.

Thus, I'm looking for something that enables me to make my date fields adjust to display the appropriate timezone based upon the day of the year.

As far as I read the Angular documentation if you don't specify a timezone it should default to the current browser one and display accordingly.

Yes. If you do not specify a timezone with Angular, then the displayed timezone will default to that of the local browser. However, we have personnel who work in multiple timezones and we want all dates on our applications to display with Eastern US time regardless of what timezone the employee might work in. Thus, we must specify a timezone and cannot fall back to the browser's timezone.

As I understand it, this issue has been addressed by extending the DatePipe when using the moment.js libraries:

The problem is that I can't seem to find a way to integrate the moment.js libraries into a Radzen solution.

A Radzen Angular application is still an Angular application. You can extend it in the exact same way.