Linking with libexiv2 masks system localtime, and on MinGW, that of libexiv2 doesn't handle DST correctly
When using the minGW environment on Windows XP the following code
produces an output of "DST: 1" when daylights savings time is active:
struct tm bdt;
bdt = *localtime(&now);
But running the same code while linking with the exiv2 lib, the
output will be "DST: 0", i.e. daylight savings time is off (not
unknown which would result in -1).
Is there any way to get around this behavior so that my software
can get a correct reading on whether DST is active or not?
If I comment out the localtime function in localtime.c that comes
with the exiv2 package, the "isdst" variable will be set correctly
(just as when exiv2 is not linked with the application). Commenting
out the code is, however, not a very nice solution since I'd have to
do that if I upgrade exiv2 in the future, and it will make it
difficult for anyone else who wants to build the code.
So, is there a way to make sure that the original localtime is used
when linking with exiv2, or is there a bug in the exiv2 localtime
that can be fixed in future versions?