Permalink
Browse files

Fix for bug 216.

Pass the time to postgresql as seconds from EPOCH instead of as a timestamp
with a timezone.  MS-Windows does not generate the timezone as a 3 letter
abbreviation but as a full word.  This patch avoids the problem.
  • Loading branch information...
1 parent 4fec715 commit e27dcc94a3e716b1c5dff34f30455a516ba794ac @ssinger ssinger committed Jun 9, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/slon/monitor_thread.c
@@ -163,8 +163,7 @@ monitorThread_main(void *dummy)
{
slon_appendquery(&monquery, "NULL::text, ");
}
- (void) strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S%z", localtime(&(state.start_time)));
- slon_appendquery(&monquery, "'%s', ", timebuf);
+ slon_appendquery(&monquery, "'1970-01-01 0:0:0 UTC'::timestamptz + '%d seconds'::interval, ", time(NULL));
if (state.event > 0)
{
slon_appendquery(&monquery, "%L, ", state.event);

0 comments on commit e27dcc9

Please sign in to comment.