Forum OpenACS Q&A: Response to Comparing timestamps in Postgres

Collapse
Posted by Don Baccus on
Or "date_trunc('minute', your_timestamp)".  This is guaranteed to work for timestamps that have differing timezones.  to_char() doesn't do timezone conversions automatically so won't work unless your timestamps are all scaled to a particular timezone (PG 7.3 will default to timestamps without timezone data but PG 7.2's default timestamp does include timezone data).