Why doesn't the date and time data in Weever match the date and time data in Power BI?

If you've been noticing differences in the dates and times displayed between Weever and Power BI, this article will explain why.

1. Time Zones in Weever

Every submission made in Weever is automatically converted into a neutral time zone (UTC) before being stored on disk or sent to end users. Weever does not store any time zone information about what time zone a user was in when they made a form submission. 

This is standard practice because computers are designed to automatically convert UTC dates/times to whatever time zone the user is in. This is not something that Weever does uniquely, this is the standard practice in the industry.

Each user application, such as the Weever Forms/Inspections web applications or Microsoft Power BI, is then able to convert those date/time values into the user’s local time zone (the time zone in which the user’s computer is at the time of being displayed). This is the default process of handling date/time values with a time zone.

The only place Weever retains time zone information is in date/time form builder elements within forms and form submissions. This is because those specific date/time values are treated like pure text and so they don't end up getting automatically converted to a neutral time zone. The reason for this is that the user inputted this time and Weever does not change user inputs. For instance, if an accident occurred at 10 am, we wouldn't want someone in another time zone to perceive it as happening at 3 pm. 

2. Time Zones in Power BI

When a user receives data into Power BI from Weever’s OData API server, it is Power BI that detects the user’s time zone and then translates all date/time values from UTC to the user’s local time zone. Most time zone-aware software works in this manner. Even if Weever were to send a date and time with a specific time zone, Power BI would convert it to the user’s time zone automatically anyway. Sending a date and time without a time zone isn’t an option for avoiding this automatic conversion either. This is because the OData protocol does not support dates and times without a time zone.

As explained above, Power BI automatically translates all date/time values to the user’s local time zone – there is no manual work required. However, if a user wants the records to always be in a specific time zone (even if the person viewing the report is in a different time zone), they can manually convert the date/time values. Here’s the article on how to do this: How can I convert date fields in Power BI?.

Unfortunately, that workaround only works within Power BI for Desktop. Once a report is deployed to the cloud, all dates and times with time zone will be re-converted back to UTC. This is a behaviour within Microsoft Power BI and is not within Weever’s control.

Time Zones in the Date/Time Form Field

As mentioned --

The only place Weever usually retains time zone information is in date/time form builder elements within forms and form submissions. This is because those specific date/time values are treated like pure text and so they don't end up getting automatically converted to a neutral time zone.

For Power BI to do its automatic translation, this field must be set as a date/time field – a user needs to change the column from Text to Date/Time. Beware that if a user changes it to Date/Time/Timezone, they are telling Power BI to not do its automatic translation of time zones but instead, they want to see what the time zone information is.

Below are three screenshots. First with a date/time field as Text, then the dropdown to change the type to Date/Time, and then finally what the result looks like once the type has been changed. Note how it picked up a local -4 EDT time zone and immediately changed the time from 12:25 PM to 8:25 AM.

Screenshot 2022-11-18 at 12.09.09