leocrawford / picasawebsync

Sync local directories with picasaweb
MIT License
59 stars 16 forks source link

Time zone issues when comparing photo dates #19

Closed bakkandris closed 10 years ago

bakkandris commented 10 years ago

While using the uploadSync mode files which exist remotely and are identical to the local file are always uploaded on my system. (timezone GMT+2) The script claims that the remote file is older.

After some digging I believe the issue is on line 326 where you use mktime to convert the UTC time received from Google into Unix style time. mktime however assumes that the input is in local time. I believe calendar.timegm() should be used instead to take the time zone into consideration.

leocrawford commented 10 years ago

Thanks to your pull request this is now fixed (commit 0b19ad6)