diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-21 14:12:38 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-21 14:12:38 +0000 |
commit | 5ca40c5d31bc8777f17a43f5b37655e4d47898b9 (patch) | |
tree | d002c4d2c93ad27927829748ac7747d5694fe830 /src/backend/utils/error/elog.c | |
parent | ba6b87f33010bf8adb46d9bc33df9abd237e51d7 (diff) |
Add comment about rationale for continuing to use C library functions
instead of src/timezone for timestamping log entries.
Diffstat (limited to 'src/backend/utils/error/elog.c')
-rw-r--r-- | src/backend/utils/error/elog.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index dc881a0067b..e47740ededa 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -37,7 +37,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.140 2004/06/03 02:08:04 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.141 2004/06/21 14:12:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1214,6 +1214,16 @@ log_line_prefix(StringInfo buf) break; case 't': { + /* + * Note: for %t and %s we deliberately use the C library's + * strftime/localtime, and not the equivalent functions + * from src/timezone. This ensures that all backends + * will report log entries in the same timezone, namely + * whatever C-library setting they inherit from the + * postmaster. If we used src/timezone then local + * settings of the TimeZone GUC variable would confuse + * the log. + */ time_t stamp_time = time(NULL); char strfbuf[128]; |