Re: [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

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

 



On 05/23/2014 05:45 PM, Laine Stump wrote:
> On 05/22/2014 10:03 PM, Eric Blake wrote:
>>
>> It would be a LOT simpler to just do:
>>
>> #include <time.h>
>>
>> tzset();
>> *offset = timezone;
>>
>> except that some older builds of mingw lack the extern variable
>> timezone.  Or maybe even do a configure check, for
>> AC_CHECK_DECLS([timezone]) (untested, just throwing out the idea), and
>> having #if HAVE_DECL_TIMEZONE with the short code and the #else clause
>> using this dance as the fallback for mingw?  Or even just ditch older
>> mingw?  I see this in Fedora 20's cross-packages for mingw:
> I'm so sick of this topic right now that I'd prefer leaving as is,
> although that is tempting.
>
> Let me think about it for the next couple hours and get back to you.

Okay, I implemented this and the two tests I just added that checked DST
started to fail. It appears that timezone doesn't account for DST. So
unless there is also a standard way to get that information from a
global, I think it would be cleaner just to forget about the global
timezone and have the single implementation

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]