I have a date stored in postgres db, e.g. 2019-09-03 15:30:03. Timezone of postgres is UTC.
When Grafana gets the date, it is 2020-09-03T15:30:03.000000Z. If I now run date_trunc('day', 2020-09-03T15:30:03.000000Z), I get 2020-09-03T00:00:00.000000Z. But, I want midnight in my local timezone.
- How do I get the local timezone (offset) in postgres or grafana?
- Could I get the timezone in military style, instead of "Z" for UTC "B"?
- Or can I somehow subtract the offset of the local timezone to get a UTC date corresponding to midnight local time?
Thanks in advance Michael