date_trunc() in a specific time zone - Mailing list pgsql-hackers

From Vik Fearing
Subject date_trunc() in a specific time zone
Date
Msg-id 6249ffc4-2b22-4c1b-4e7d-7af84fedd7c6@2ndquadrant.com
Whole thread Raw
Responses Re: date_trunc() in a specific time zone  (Andreas Karlsson <andreas@proxel.se>)
Re: date_trunc() in a specific time zone  (David Fetter <david@fetter.org>)
List 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.

Attached is a patch to create a function for it, based off 5953c99697.
-- 
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

Attachment

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: FETCH FIRST clause WITH TIES option
Next
From: Andreas Karlsson
Date:
Subject: Re: date_trunc() in a specific time zone