Re: [libvirt] [PATCH v4] util: new function virTimeLocalOffsetFromUTC

2014-05-28 Thread Wangrui (K)
m] > On Behalf Of Laine Stump > Sent: Tuesday, May 27, 2014 7:46 PM > To: libvir-list@redhat.com > Subject: Re: [libvirt] [PATCH v4] util: new function virTimeLocalOffsetFromUTC > > On 05/24/2014 05:21 PM, Eric Blake wrote: > > From: Laine Stump > > > > Since

Re: [libvirt] [PATCH v4] util: new function virTimeLocalOffsetFromUTC

2014-05-27 Thread Laine Stump
On 05/24/2014 05:21 PM, Eric Blake wrote: > From: Laine Stump > > Since there isn't a single libc API to get this value, this patch > supplies one which gets the value by grabbing current time, then > converting that into a struct tm with gmtime_r(), then back to a > time_t using mktime. > > The r

Re: [libvirt] [PATCH v4] util: new function virTimeLocalOffsetFromUTC

2014-05-25 Thread Laine Stump
On 05/24/2014 05:21 PM, Eric Blake wrote: > From: Laine Stump > > Since there isn't a single libc API to get this value, this patch > supplies one which gets the value by grabbing current time, then > converting that into a struct tm with gmtime_r(), then back to a > time_t using mktime. > > The r

[libvirt] [PATCH v4] util: new function virTimeLocalOffsetFromUTC

2014-05-24 Thread Eric Blake
From: Laine Stump Since there isn't a single libc API to get this value, this patch supplies one which gets the value by grabbing current time, then converting that into a struct tm with gmtime_r(), then back to a time_t using mktime. The returned value is the difference between UTC and localtim