Re: localtime(0)

Поиск
Список
Период
Сортировка
От Jonathan S. Katz
Тема Re: localtime(0)
Дата
Msg-id D5862B29-48BD-4275-A6A3-A077B2357538@excoventures.com
обсуждение исходный текст
Ответ на localtime(0)  (Suresh Raja <suresh.rajaabc@gmail.com>)
Список pgsql-sql
Hi Suresh,

On Dec 29, 2014, at 11:31 AM, Suresh Raja <suresh.rajaabc@gmail.com> wrote:

Hi:

I'm using  localtime(0) in various part of the function, and updating table with the time. I use localtime at places like the start of the function and at the end of the function. The function takes about 5 mins to run,.  The issue is that the function always print the same time for both start and end.  I'm trying to capture the time at various point of the function, but it always print the same time.  Is localtime(0) is not correct.

You probably want the "clock_timestamp()" function.  There is an explanation for all the PostgreSQL current date/timestamp functions here: http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT

Best,

Jonathan

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

Предыдущее
От: Suresh Raja
Дата:
Сообщение: localtime(0)
Следующее
От: Rene Romero Benavides
Дата:
Сообщение: Re: localtime(0)