patch for localtime
Nelson Murilo
nelson at pangeia.com.br
Fri Oct 29 19:37:38 CEST 2004
Hi guys,
I don´t known if someone have this problem, but my date of
my alers showed wrong time. So I write a patch for fix it,
anybody could confim if works?
Thanks
./nelson -murilo
-------------- 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