Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones - Mailing list pgsql-general

From Lincoln Swaine-Moore
Subject Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones
Date
Msg-id CABcidkLUzPf2npEH3P+OMYA53o4=xOAMrn_LZzu8nSgdnmRJHQ@mail.gmail.com
Whole thread Raw
In response to Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
> Really UTC (not that it matters for calculation purposes)

Sorry, yes--I just meant that literally when I run `show timezone` on the server in question, I get `GMT`.

> As to "other places" in your (or others) code, provided that you are storing and manipulating your data as timestamp WITH time zone (point in time)

Unfortunately this is not the case for my codebase/schema. The data is stored WITHOUT. I glossed over this fact in my post, because they are in fact UTC times that have had their (0) offset truncated, and prior to my usage of any solution I can use `at time zone 'UTC'` to properly handle them. But I don't think it's the case that in the application more generally this is being handled gracefully, and so the behavior that is currently (correctly) running is being propped up by the database's time zone setting. In the long term, I think it might be appropriate to create a new column that is simply `t at time zone 'UTC'`, and use that everywhere, but that's not feasible for the task I'm handling right now.

Thanks!

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones
Next
From: Lincoln Swaine-Moore
Date:
Subject: Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones