Re: date_trunc() in a specific time zone

Corey Huinker <corey.huinker@gmail.com>

From: Corey Huinker <corey.huinker@gmail.com>
To: vik.fearing@2ndquadrant.com
Cc: andreas@proxel.se, pgsql-hackers@lists.postgresql.org
Date: 2018-10-29T23:04:10Z
Lists: pgsql-hackers
>
> >> A use case that I see quite a lot of is needing to do reports and other
> >> calculations on data per day/hour/etc but in the user's time zone.  The
> >> way to do that is fairly trivial, but it's not obvious what it does so
> >> reading queries becomes just a little bit more difficult.
>
>
+1 A client encountered this exact problem last week, and I was surprised
that the parameter didn't already exist.

Commits

  1. Add a timezone-specific variant of date_trunc().