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
signature.asc
Description: OpenPGP digital signature