Date time

Nelson Murilo nelson at pangeia.com.br
Wed Nov 10 13:18:36 CET 2004


Try the path in attach.

./nelson -murilo

On Wed, Nov 10, 2004 at 10:13:32AM -0200, Eduardo Oliveira Scricco (Service) wrote:
> Hello all,
> 
> I'm receiving the nagios notifications with worong date/time, one hour
> late.
> 
> The "date" command is ok, as well other stuffs.
> 
> Where I can configure this time?
> 
> Thanks
> Eduardo
-------------- next part --------------
--- utils.c.old	Thu Oct 28 14:34:31 2004
+++ utils.c	Thu Oct 28 14:38:27 2004
@@ -669,13 +669,17 @@
 /* updates date/time macros */
 int grab_datetime_macros(void){
 	time_t t;
+        struct timeval tv;
 
 #ifdef DEBUG0
 	printf("grab_datetime_macros() start\n");
 #endif
 
 	/* get the current time */
-	time(&t);
+	/* time(&t);            */
+	gettimeofday(&tv, NULL);
+        t = tv.tv_sec;
+
 
 	/* get the current date/time (long format macro) */
 	if(macro_date_time[MACRO_DATETIME_LONGDATE]!=NULL)


More information about the Users mailing list