Re: git cherry-pick timestamping issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: git cherry-pick timestamping issue
Дата
Msg-id 1745.1285341790@sss.pgh.pa.us
обсуждение исходный текст
Ответ на git cherry-pick timestamping issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> Apparently somebody's confused between local and GMT time somewhere in
> there.

For the archives' sake: this turns out to be a portability issue not
handled by the git code.  If you are running on a platform old enough
to have gmtime_r returning int rather than struct tm *, you need this
patch:

*** date.c~    Sat Sep 18 19:43:54 2010
--- date.c    Fri Sep 24 10:57:28 2010
***************
*** 406,412 ****     case '.':         now = time(NULL);         refuse_future = NULL;
!         if (gmtime_r(&now, &now_tm))             refuse_future = &now_tm;          if (num > 70) {
--- 406,412 ----     case '.':         now = time(NULL);         refuse_future = NULL;
!         if (gmtime_r(&now, &now_tm) == 0)             refuse_future = &now_tm;          if (num > 70) {
***************
*** 469,475 ****      */     if (num >= 100000000 && nodate(tm)) {         time_t time = num;
!         if (gmtime_r(&time, tm)) {             *tm_gmt = 1;             return end - date;         }
--- 469,475 ----      */     if (num >= 100000000 && nodate(tm)) {         time_t time = num;
!         if (gmtime_r(&time, tm) == 0) {             *tm_gmt = 1;             return end - date;         }


[ /me resolves to actually run a program's regression tests before
assuming it works ]
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
Следующее
От: André Fernandes
Дата:
Сообщение: Re: Name column