Re: [Nagios-devel] Fix for mktime() issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Fix for mktime() issue

Post by Guest »

--=-L9SapxTXauBNsJ+elT+5
Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Am 15.03.10 20:42 schrieb(en) Ton Voon:
> This patch was applied to Nagios Core and was in 3.2.0. I've fixed a spec=
ific problem last year with timeperiods when DST moved back one hour, but I=
didn't change the other occurrences of this patch. My feeling was to get a=
test case for the specific changes before reverting the patch.
>=20
> However, I think there are still some timezone issues (as mentioned by Ma=
rk Frost on nagios-users), so I'm thinking that I should revert the entire =
patch and instead say that if you want to add the isdst=3D-1 in, then add t=
est cases in.

The POSIX standard says [1]


A positive or 0 value for tm_isdst shall cause mktime() to presume initiall=
y that Daylight Savings Time, respectively, is or is not in effect for the =
specified time. A negative value for tm_isdst shall cause mktime() to attem=
pt to determine whether Daylight Savings Time is in effect for the specifie=
d time.


Thus, unless you know for sure that daylight savings is in effect or not fo=
r a specific date, /not/ using tm_isdst Opinions?

What should be the purpose of a test case if the code strictly follows POSI=
X?

Best, Albrecht.

[1]

--=-L9SapxTXauBNsJ+elT+5
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)

iD8DBQBLnpQ3n/9unNAn/9ERAgO6AJ96F9vcDov/Yvk8YixG15PbPNvgkgCfaUzj
47ydN53orlitJE/gpDMPCcg=
=EYr4
-----END PGP SIGNATURE-----

--=-L9SapxTXauBNsJ+elT+5--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked