Обсуждение: casting timeofday() to timestamp boken under cygwin - Problem identified

Поиск
Список
Период
Сортировка

casting timeofday() to timestamp boken under cygwin - Problem identified

От
Tim McAuley
Дата:
Hi there,

Regarding my last email. I have found the issue. Windows 2K is reporting
the timezine as GMTDT (GMT, Dublin time... I think) and I don't believe
Postgresql can understand this.

See the following code segments:

mcauleyt=# select timeofday();
               timeofday
---------------------------------------
 Fri Jul 25 10:38:13.056614 2003 GMTST
(1 row)

mcauleyt=# select substr(timeofday(), 1, 35);
               substr
-------------------------------------
 Fri Jul 25 10:38:16.952614 2003 GMT
(1 row)

mcauleyt=# select timeofday()::timestamp;
ERROR:  Bad timestamp external representation 'Fri Jul 25
10:38:51.410614 2003 GMTST'

mcauleyt=# select substr(timeofday(), 1, 35)::timestamp;
           substr
----------------------------
 2003-07-25 10:38:57.918614
(1 row)

Re: casting timeofday() to timestamp boken under cygwin - Problem identified

От
Tom Lane
Дата:
Tim McAuley <mcauleyt@tcd.ie> writes:
> Regarding my last email. I have found the issue. Windows 2K is reporting
> the timezine as GMTDT (GMT, Dublin time... I think) and I don't believe
> Postgresql can understand this.

No, it wouldn't recognize that.  You could add the zone name as a
keyword in the datetktbl[] table, src/backend/utils/adt/datetime.c.

            regards, tom lane