Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
kamil2
Frequent Visitor

Different data time zones between R and Power Bi Desktop using the same source code in R

I work with GmailR package and Power Bi and I observe that my email data have different message "time" in RStudio (correct time UTC+1, same that in Gmail account) and Power Bi (wrong time, UTC+0) when I using same query code in both tools.

Screen:
stack_power_R_time_wtf.jpg

link:
https://ibb.co/TM12Bk1

My query code is based on gmailR, i get specific data in list's from gmail and transform to table (tibble object in R). Then I run code in PowerBi as data source.
I get time from message list, not fuction gm_data (because of cases when this function get null values). Below sample code (in R):

 

gmail_DK<- msgs_meta_DK %>% {
tibble(
date = map_chr(., "internalDate")
)

 



and then I change timestamp to normal data time. Sample code (in R):

 

 gmail_DK <- gmail_DK %>%
mutate(date = as.POSIXct(as.numeric(date) /1000, origin="1970-01-01"))

 

 


I checked regional settings in PowerBi Deskop and it is correct - UTC+1.
I'm in UTC+1 time zone, gmail account is for UTC+1 (this is customer service email, but as I know all customer agent's are too in UTC+1 time zone) and most of message are from and to UTC+1 users.

I can change this difference using PowerQuery or just add hour in my query code in R, but I'm curious why is this difference happen?

 

1 REPLY 1
lbendlin
Super User
Super User

It's not really wrong per se, it''s how Power BI is designed.  By default Power BI runs on UTC, and you as the developer can choose to let it do its thing (and let the report consumer's locale do the conversion) or - if you choose - to enforce a particular timezome.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.