Re: Getting the name of the timezone, adjusted for daylight saving
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Getting the name of the timezone, adjusted for daylight saving |
| Дата | |
| Msg-id | 15419.1296055249@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Getting the name of the timezone, adjusted for daylight saving (Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk>) |
| Ответы |
Re: Getting the name of the timezone, adjusted for daylight saving
|
| Список | pgsql-general |
Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk> writes:
> SELECT to_char(('2011-03-01 12:00' AT TIME ZONE 'GMT0BST')::TIMESTAMP
> WITH TIME ZONE, 'HH24:MI TZ');
> to_char
> -----------
> 12:00 GMT
> (1 row)
You haven't said exactly what you were hoping to accomplish, but I
suspect the point here is to format a time according to some other zone
than the prevailing TimeZone setting. You basically can't do that, at
least not with to_char and the timestamptz data type --- the information
just isn't there. Consider creating a little plpgsql function that
temporarily changes the timezone setting and then calls to_char.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера