Re: [PATCH] [python] Include device->timezone_shift in sw_ipod_device_to_dict()

Christophe Fergeau <[email protected]> Fri, 8 Jul 2011 23:29:59 +0200
Newsgroups gmane.comp.ipod.gtkpod
Message-ID <CACw48R=hBpFcW5PwRFGdoNPPZKxDT0+mQ5qGTwnWLnBaXKSqoQ@mail.gmail.com>
Hey,

2011/7/8 Adeodato Simó <[email protected]>:
> In the first case, this could be solved if the Pythonic API would
> provide datetime objects with timezone information (but, beware, this
> can get very hairy very easy very fast).

Yep, that would be my preference if that's doable sanely (say without
adding more than ~30 lines of code)

> And there's no other solution
> for the second case other than exposing this field (typically, Unix
> timestamp + UTC offset is the most robust way to represent time
> internally in any application).

I must say that timezone issues always confuse me ;) And I'm not that
experienced with that, I didn't even know that application typically
use time_t + an additional UTC offset to represent time robustly. :)

And yeah, now it makes more sense to me, you need this offset because
you're interested in timestamps in both UTC and ipod local time, and
the conversion from UTC to local time is specific to the iPod and may
not be the same as a conversion from UTC to local time on the host.

Thanks for the explanation!

Christophe

>
> Thoughts?
>
> Thanks for taking a look,
>
> --
> - Are you sure we're good?
> - Always.
>         -- Rory and Lorelai
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2