Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones

Поиск
Список
Период
Сортировка
От Lincoln Swaine-Moore
Тема Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones
Дата
Msg-id CABcidkLUzPf2npEH3P+OMYA53o4=xOAMrn_LZzu8nSgdnmRJHQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones  (Steve Crawford <scrawford@pinpointresearch.com>)
Список 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 по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones
Следующее
От: Lincoln Swaine-Moore
Дата:
Сообщение: Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones