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:
Manipulate timestamps with Flux | InfluxDB Cloud Documentation
Sorry for the delay.