On Tuesday 31 July 2012 07:02:22 Nikos Chantziaras wrote:
> On 31/07/12 06:43, Lorn Potter wrote:
> > On 31/07/2012, at 1:28 PM, Nikos Chantziaras wrote:
> >> I wonder if it's possible to deduce the timezone from the system's UTC
> >> offset?  The offset can be determined through gmtime() and localtime(),
> > 
> >> both in C89 so nothing platform-specific here:
> > If it were that easy, we wouldn't need the extensive tz database. :)
> 
> Indeed.  That was quite a naive question, since several timezones most
> probably have the same offset, so you can't use the offset as an index
> into the tz database.

I did a quick count on my copy of tzdata: 542 zone files, not including the 
simple offsets (582 total).

But you gave me a nice idea: those offsets could be used as a fall-back in 
case auto-detection fails miserably. Thanks.


        Konrad

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to