Daylight Savings CGI bug

Mark Goldfinch mark.goldfinch at modicagroup.com
Wed Jul 1 09:55:51 CEST 2009


Greetings all,

I've discovered a Daylight Savings Time bug within the avail, histogram, summary and trends CGIs.

To reproduce, run a custom report timeperiod for a duration which spans migration into or out of DST.  As an example using NZST either 1st Apr to 30th Apr or 1st Sep to 30th Sep.  Note the start and end time, either the start or end time will be an hour out from what one would expect.

Please see the attached patch to fix.  The problem arises from using the generated tm_isdst flag from calling localtime(&current_time) within compute_report_times().  It should be noted setting tm_isdst=-1 is used elsewhere within these CGIs already.

Thanks,
-- 
*Mark Goldfinch | Systems Administrator*

*MODICA GROUP*
DIGITAL MEDIA SOLUTIONS

phone: +64 4 385 7444 | ddi: +64 4 498 3485

Level 4 | 138-140 Wakefield Street | Wellington
www.modicagroup.com <http://www.modicagroup.com/>

*MODICA SERVICES:*

*SONIC:*Mobile solutions
*BREATHE:*Web design and development
*ONESQUARED:*IT Infrastructure


US | UK | NZ | AUS | SING
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgi-dst-reporting.patch
Type: text/x-patch
Size: 2012 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090701/59f1ce45/attachment.bin>
-------------- next part --------------
------------------------------------------------------------------------------
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list