rwilson504 / PCFControls

Reusable PowerApps Control Framework (PCF) controls.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Times in UTC?

jasa88 opened this issue · comments

I've just installed the calendar on a model driven app I've developed and it's solved so many issues I've been having which is awesome, the only problem is that my event start times and date times are in UTC, and the calendar keeps trying to compensate for British Summer Time which is UTC +1. Is there any way of forcing the calendar to use UTC time?

commented

Hi Art,

That's really weird, because when I put the Calendar Control V2 view on, it displays the events in UTC, but when I do the rbc view it displays them in BST, so to me that's rbc converting the time?

commented

Hi Art,

Apologies, rbc = React Big Calendar. It's a model driven app I'm using and so I've created 2 different views, one using Calendar Control V2 and one using React Big Calendar.

For the date and time field, I have the following options set:

Type: Date and time
Field type: Simple
State: Unmanaged
Field security: Disabled
Audit status: Enabled
Customizable: True
Behaviour: Time Zone independant

Screen shots below of settings and what everything looks like:

Screenshot 2022-05-12 at 10 32 56

Screenshot 2022-05-12 at 10 33 24

Screenshot 2022-05-12 at 10 33 41

Screenshot 2022-05-12 at 10 33 56

commented

I just set my user time to Canada (-4 UTC) and nothing moved on the app itself, the Calendar Control V2 view stayed in UTC, and the rbc Calendar view stayed in BST.

However, just to satisfy my curiosity I downloaded a Chrome extension to change the timezone of my browser, Calendar control V2 again stayed where it was, but everything on the rbc view moved relative to the updated timezone(!!) It appears that react big calendar somehow uses my browser locale to know what timezone it should be displaying things in relative to UTC. I can't really ask all the users of the app to download a Chrome extension to change their timezone as god knows what bugs that would introduce, but is there a way of telling react big calendar what timezone to use and ignore the browser locale?

commented