[syslog-ng]My syslog-ng time is somehow set to GMT ?

Roberto Re syslog-ng@lists.balabit.hu
Wed, 13 Aug 2003 10:50:48 +0200


Hi All,
my syslog-ng time is somehow set to GMT .

I see the time off by 2 hours _*only*_ in the destination d_postgres* 
(with source s_tcp, s_udp) , in d_msg* destination (with source s_sys) 
the time is OK  !?!

I've installed a syslog-ng 1.6.0rc3 from src on a RH9 and i've 
interfaced it with a postgreSQL 7.3.2 ;
I've set the crontab with "ntpdate -b  time.ien.it" and it works  ;
I've configured the syslog-ng.conf with this options:

********************************************************************************

###############################################################################
options { sync (0);
    time_reopen (10);
    log_fifo_size (100);
    long_hostnames (on);
    use_dns (yes);
    use_fqdn (yes);
    create_dirs (yes);
    keep_hostname (yes);
    time_reap(12);
    gc_busy_threshold(768);
    use_time_recvd(0);
    };
###############################################################################
source s_sys { unix-stream ("/dev/log"); internal(); };
    source s_udp { udp(); };
    source s_tcp { tcp(); };
    source s_local { internal(); };
###############################################################################
# destination d_files { file("/var/log/syslog-ng/$HOST/$FACILITY.$LEVEL"
# template("$ISODATE $HOST $FACILITY $PRIORITY $PROCESS $MSG\n"));
# };

destination d_msgs { file("/var/log/messages"
    template("$FULLDATE $HOST $FACILITY.$PRIORITY $MSG\n"));
    };

[...the output on file is OK with the local time]

destination d_postgres { 
file("/var/spooldir/syslog2pgsql/fulllog.$YEAR.$MONTH.$DAY.$HOUR.$MIN.$SEC"
    template("INSERT INTO msg_table VALUES 
('$FULLDATE','$FULLDATE','$HOST','$FACILITY', '$PRIORITY', '$MSG');\n")
    template_escape(yes)
    owner(postgres));
    };

[... the output on DB is 2 hour WRONG :( ?? ]

*********************************************************************************

Another think : if I set use_time_recvd(0) -> use_time_recvd(1) (???) 
the time in /var/log/messages becomes wrong to ?????

Ciao and Thanks in Advance
  Roberto