Re: log_filename_prefix --> log_filename + strftime()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, Jan Wieck <JanWieck(at)Yahoo(dot)com>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Subject: Re: log_filename_prefix --> log_filename + strftime()
Date: 2004-09-20 23:39:59
Message-ID: 23223.1095723599@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Ed L." <pgsql(at)bluepolka(dot)net> writes:
> + /*
> + * We expect a strftime(%z) result of the form "[+-]HHMM" according to
> + * RFC822-conformant dates, where HH:MM is the unsigned UTC offset.
> + * If we don't get it, just return zero offset, and let the logs
> + * rotate on UTC time boundaries.
> + */
> +
> + count = strftime(msg, 6, "%z", localtime(&now));

That might work for you, but it's not portable.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Ed L. 2004-09-20 23:45:01 Re: log_filename_prefix --> log_filename + strftime()
Previous Message Ed L. 2004-09-20 23:25:20 Re: log_filename_prefix --> log_filename + strftime()