Flux: Today, Week to Date, Month to Date, etc

I’m trying to get a start of day and start of month aggregate for my power usage to throw on dashboard. What I was trying was:

period = date.truncate(t: now(), unit: 1d)

The problem is that returns the UTC start of day, I need my local time start of day. How can I do this in Flux?

Hello @Kalagaraz,
I believe this is what you need:
https://docs.influxdata.com/influxdb/cloud/query-data/flux/operate-on-timestamps/
Sorry for the delay.