What steps will reproduce the problem?
1. Create a task in Shuffle
2. Do a Tracks sync
3. Add a description for the task in Shuffle (don't touch it in Tracks)
4. Do a Tracks sync again
5. See in Shuffle if the modification done in step 3 are still there
What is the expected output? What do you see instead?
I'd expect to still see the description added in step 3 after executing a new
tracks sync in step 4, since nothing has been done to the task in tracks.
Instead the task is "reverted" to the state it was in after the initial tracks
sync.
Additionally the Last modified timestamp of the task is 1h in the future after
the second sync in step 4.
What version of the product are you using? On what operating system?
Tracks 2.0 & Shuffle 1.7.x (hg head) & Android simulator running Froyo
Please provide any additional information below.
The problem seems to be related to an obvious bug in Android/Harmony JRE
DateFormat class. This class is used by Shuffle's own DateUtils class for BOTH
parsing and formatting dates. I did some testing and it seems that the
DateFormat class changes it's internal timezone when parsing a date string with
timezone info, so it should only be used for one purpose. (I also verified that
the OpenJDK version of DateFormat is better behaving and doesn't let parsing
change it's internal state.)
I haven't reported a Harmony/Android JRE bug yet, but will do it when I have
more time. Meanwhile a workaround is to simply use a separate DateFormat class
for parsing and formatting dates in Shuffle. Attached is a patch to do this.
Without this patch the Tracks sync can seem to work, but still fail in special
cases. If you wait some time (1h in my case) before doing the re-sync (step
4.), the task is not overwritten with the old version (the desired result).
It's also possible that this problem only manifests itself with a certain host
(Tracks) timezone + certain client (Shuffle) timezone + DST active.
Original issue reported on code.google.com by jaakko.s...@gmail.com on 10 Sep 2011 at 7:17
Original issue reported on code.google.com by
jaakko.s...@gmail.com
on 10 Sep 2011 at 7:17Attachments: