Re: Patch! Change Time(zone) function



Hej Mattias

I am definitely not the right guy to answer these questions :)
I am trying to understand it myself.
Anyway, there is a problem with the current code with time and timezone
and converting to UTC. The hours will be of in some cases. This according
to a previous mail from Larry to this list.

/Bengt

On On, 2005-08-17, 02:40 am, Mattias Holmlund skrev:
> On 8/16/05, Bengt Thuree <bengt thuree com> wrote:
>> Hej
>>
>> F-Spot stores all timestamps as UTC.
>
> Yeah, I looked briefly at the code and found a comment about that. But
> I can't quite figured out how it is supposed to work. I looked at one
> image that I have taken. The exif-information says that the image was
> taken at 20:49 on 2005-05-21. The modification time of the file is
> also 20:49. The f-spot gui says that the image was taken 18:49. The
> sqlite database has time as 1116697783. If I use Perl's localtime (I'm
> a perl-guy...) it says that it equals 19:49, but I'm not sure about
> how localtime handles timezones.
>
> The correct interpretation would be 22:49 in the +0200 timezone, since
> the picture was taken in Stockholm during daylight savings time and my
> camera is set to UTC.
>
> What does the time displayed by f-spot mean? Should it be the local
> time where the picture was taken, the local time of f-spot at the time
> the image was taken or something else?
>
> One solution is to store a display-timezone along with the time. We
> could then show the time of my picture as 2005-05-21 22:49 +0200 and a
> picture taken in the New York at the same time would show 2005-05-21
> 16:49 -0400. Both pictures would have the same utc-time stored in the
> database, but different values for the display-timezone field.
>
> /Mattias

-- 
Bengt Thuree   bengt thuree com    www.thuree.com/bt




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