Consistent date picker for all time zones?

Ian
Ian
Vote:
 

We have multiple content editors in different time zones and I'm looking for a way to show all content editors the same date/time picker in the CMS, regardless of time zone. Currently, the date/time picker adjusts for the user's local time zone, which makes it impossible for editors to select a consistent date/time for fixed event dates.

We're looking to make the dates in the CMS admin UI consistent for all users. Is that even possible? 

The date/time property we're currently using is as follows:

[CultureSpecific]
public virtual DateTime StartDate { get; set; }
#305450
Edited, Jul 20, 2023 15:55
Vote:
 

Hi Ian,

Is it causing an issue?

As I understand datetimes should be converted to utc datetime when storing in the database.

https://world.optimizely.com/documentation/Items/Developers-Guide/Episerver-CMS/9/Deployment/storing-utc-date-and-time-in-the-database/

Paul

#305452
Jul 20, 2023 19:09
Ian
Vote:
 

@Paul - no, it does not seem to be converting date/time fields to UTC. For example, a raw value from the Epi DB is 2023-01-26 05:00:00.000. We're on v11.14.0 for what it's worth.

#305494
Jul 21, 2023 16:51
Vote:
 

Hi Ian

The date/time picker only shows the time based on the timezone on the user's system. It does not store the date in that timezone.

In the database it is stored in UTC, by default. And the content properties will also return UTC dates.

Changing editor UI to always use a certain time zone is not so easy.

#305532
Jul 22, 2023 16:04
Ian
Vote:
 

@Stefan - understood. I'm looking to always show the same time for all users, regarldess of time zone. The fact that it changes the date/time based on time zone is what is causing us issues. Are there any solutions that might always show the date/time picker in UTC vs converted to the user's local time zone? 

The use case here is we have pages that show events that need to be set to a fixed date/time as we manage the event's time zone in a separate field. Since editors in different time zones are shown different values, it causes much confusion.

#305567
Edited, Jul 23, 2023 15:02
Vote:
 

There are no configuration for this. So you would need to "get your hands dirty" with overriding two Dojo classes:

  • One that renders the UTC time as local time.
  • One that configures the date/time picker to the time zone.

But I don't know whether exactly those two classes can be overridden.

#305568
Jul 23, 2023 15:51
Ian
Vote:
 

Thanks Stefan. It seems a little strange that this isn't functionality available out of the box.

#305630
Jul 24, 2023 13:57
Stefan Holm Olsen - Jul 27, 2023 16:23
Yeah, it would be nice to make it a per-user profile property, like the system language. You should propose it on feedback.optimizely.com.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.