I’m trying to plot a timeseries in metabase from data queried from Google Big Query. But for some reason, my dates in metabase are 1 day behind my dates in GBQ, even though I’m using the exact same query.
Below I’ve included the result I’m getting, along with the query I’m using.
extract(date from timestamp_seconds(time_stamp)) as date
on event_id = user_info.user_id
where event = 'change_screen'
and screen = 'canvas'
and Internalquestion_ is null
and user_info.email not like '%bonsai%'
group by email, date
order by date desc
Which version of Metabase?
Timezones are really tricky, but have a look at the troubleshooting guide:
What are the answers to the 6 bullet points?
Thanks! So here’s the answer to the questions
Version of Metabase: 0.33.0
- What is the Timezone of the data being displayed improperly: UTC
- Are you using an explicit time zone setting on each timestamp, or are the timestamps being stored without a timestamp? (E.g.,
Dec 1, 2019 00:00:00Z00 is an explicitly timestamped value, but
Dec 1, 2019 has an implied time zone.): I am doing the former. I.e. storing values implicitly
- What Timezone is the database server set to: Not sure how to check this in Google Big Query. Any advice?
- What timezone is the server running Metabase set to?: Again not sure how to check this. I’m just running it locally.
- What is your reporting timezone set to: UTC
- What is your browser timezone set to: EST
Okay, if you’re running Metabase locally, then you are most likely just using your computers timezone (EST). Try setting
-Duser.timezone=UTC when running Java.
I don’t know BigQuery that well, but I would guess it’s running UTC. That specific question is more for folks running MySQL or similar on their own servers.