Bug 136153 - When sync with my iPod Amarok displays previously played tracks as having been last played in the future
Summary: When sync with my iPod Amarok displays previously played tracks as having bee...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/iPod iPhone (show other bugs)
Version: 2.0-SVN
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-22 23:51 UTC by Tony Kissell
Modified: 2012-08-05 13:42 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Convert Last Played timestamps to UTC when synchronising from iPod (774 bytes, patch)
2006-11-03 13:23 UTC, Michael Gorven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Kissell 2006-10-22 23:51:15 UTC
Version:           1.4.3 (using KDE 3.5.1 Level "a" , SUSE 10.1)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.21-0.25-default

My location is GMT +13 hours
When plugging in my iPod Amarok either says the songs have been played in the future or if over 12 hours ago says they have been played at the time less 12 hrs (at 6:00 pm it will report a song played at 4:00 am as having been played 2 hours ago )
I have tried setting my system time to UTC and also setting my iPod to 24 hr clock but it makes no difference
Comment 1 Seb Ruiz 2006-10-23 01:05:01 UTC
You don't need to have your system time changed, but rather the timezone on the ipod.  Make sure the date is correct too.
Comment 2 Tony Kissell 2006-10-23 02:14:06 UTC
iPod time, date and time zone are correct and matches the time, date and time zone on my PC.
Having just played a track on my iPod, connecting it to Amorok says "Last Played: Tomorrow"
Comment 3 Tony Kissell 2006-10-23 02:32:10 UTC
Changing the time zone on my iPod to one that is 12 hours behind me, Amarok now shows the correct last played details but this is not a solution as the calendar on my iPod is now incorrect as are any alarms I have set on it
Comment 4 Martin Aumueller 2006-10-23 03:26:46 UTC
Can you please report exactly which timezones you have set on your computer and your ipod? What version of libgpod are you using?
Comment 5 Tony Kissell 2006-10-23 04:04:05 UTC
My time zone is set to Pacific, Auckland, New Zealand (GMT + 13 hours) on both my PC and my iPod

I am using libgpod 0.3.2-4@i586
Comment 6 Michael Gorven 2006-11-03 09:31:50 UTC
I can confirm this bug. I'm in UTC+0200, and if the timezone on my iPod is set to UTC+0200 then the Last Played timestamp is 2 hours ahead. If I set my iPod to UTC then the timestamp is correct. I found the following comment in the libgpod code:

    /* NOTE:
     *
     * The iPod (firmware 1.3, 2.0, ...?) doesn't seem to use the
     * timezone information correctly -- no matter what you set
     * iPod's timezone to, it will always record as if it were set
     * to UTC -- we need to subtract the difference between
     * current timezone and UTC to get a correct
     * display. -- this should be done by the application were
     * necessary */

As I read it, Amarok needs to convert the timestamp to UTC when synchronising. From glancing through the Amarok source code, it looks like it doesn't do this.
Comment 7 Michael Gorven 2006-11-03 13:23:01 UTC
Created attachment 18379 [details]
Convert Last Played timestamps to UTC when synchronising from iPod

The iPod seems to store Last Played timestamps as localtime, regardless of what
timezone it is set to (i.e. exactly what the time is displayed as). My patch
converts these timestamps to UTC by subtracting the timezone offset.

I'm not sure if my method of getting the timezone offset is the best method. I
also don't know if this behaviour applies to all iPods. Mine is a 2G Nano.
Comment 8 shattered 2007-07-21 14:51:39 UTC
libgpod should handle this now: http://permalink.gmane.org/gmane.comp.ipod.gtkpod.cvs/1522
Comment 9 Lydia Pintscher 2008-08-06 00:13:34 UTC
Alejandro, can you please comment on this? Is this still a problem in Amarok 2?
Comment 10 Alejandro Wainzinger 2008-08-06 01:27:54 UTC
Last played et al are NYI on A2 as a matter that goes along with sync'ing of devices with local collection.  Jefferai is working on AFT stuff currently, so until that gets dealt with not a ton I can do.
Comment 11 Alejandro Wainzinger 2008-08-06 01:39:56 UTC
... and so this will be fixed for 2.0.
Comment 12 Myriam Schweingruber 2012-08-05 13:42:21 UTC
Closing correctly. Solved in Amarok 2.x already.