monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monit problems


From: Christian Hopp
Subject: Re: Monit problems
Date: Wed, 15 Jan 2003 10:30:07 +0100 (CET)

On Tue, 14 Jan 2003, arthur.chereau wrote:

> >
> > > The "Date: " field in alert mails is wrong. For instance, if a mail is 
> > > sent at 17:30
> > > localtime, it will show as 16:30 in my mailbox. This is because the 
> > > timezone shift is
> > > wrong: I live at UTC + 1 (France), and the mails are sent with "+0200" in 
> > > the date field.
> >
> > What operating system are you using?

(...)

There is a problem with the calculation of the daylight saving.  The fixed
version is on the cvs.  Anyways, this diff should solve it too,

---- SNIP -----
--- monit/monit/util.c  2002/12/30 15:25:30     1.52
+++ monit/monit/util.c  2003/01/15 09:01:55     1.53
@@ -742,7 +742,7 @@
   timezone_h = tm_now->tm_gmtoff/3600;
   timezone_m = abs(tm_now->tm_gmtoff/60)%60;
 #else
-  timezone_h = -(timezone/3600)+daylight;
+  timezone_h = -(timezone/3600)+(tm_now->tm_isdst>0);
   timezone_m = abs(timezone/60)%60;
 #endif
---- SNAP -----

Christian

-- 
Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf.   fax: +49-5323-72-3197
                             pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]