qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/3] qga: add support to get host time


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 1/3] qga: add support to get host time
Date: Mon, 14 Jan 2013 07:23:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 01/13/2013 08:17 PM, Lei Li wrote:
> On 01/11/2013 11:37 PM, Eric Blake wrote:
>> On 01/11/2013 12:18 AM, Lei Li wrote:
>>> For this version, it's a one-hour offset represented as:±[hh].
>>> Negative values are west, andpositive values are east of UTC.
>> Won't work.  There are timezones with a half-hour offset.  You need to
>> express offset at least in terms of minutes, not just hours.
>>
> Yes, I have thought about this. For the timezones with a half-hour offset,
> it can just represented as +0.5 for example.

Floating point parsing is a pain compared to integer parsing.  Remember,
there is no way in POSIX to print a locale-independent floating point
number, which forces programs to jump through quite a few hoops to
guarantee that they are using '.' for the radix character in JSON output
while still honoring the user's locale.

Please, use something based at a minimum on minutes (seconds is also
possible), not hours,

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]