~sschwarzer/ftputil#81: 
Round timezone differences to 15-minute units, not hours

The method FTPHost.synchronize_times writes a file on the server, reads the timestamp back and compares this time with the client time. The time difference (time shift) is then used to calculate "real" time differences for upload_if_newer and download_if_newer.

This method contains a supposed sanity check for the calculated time shift that raises an exception if the time shift isn't in full hours plus/minus five minutes. Also the calculated time shift is then rounded to full hours.

However, ​not all time zones have a full-hour offset from UTC! For example, India has UTC+05:30 and Nepal has UTC+05:45. Therefore, ftputil should accept time shifts in 15-minute units, not only in hours.

I set the priority of this ticket to "minor" because nobody has ever complained about the problem. Moreover, you can work around the problem by setting the time shift "manually" with FTPHost.set_time_shift to any float value you like.

Status
RESOLVED FIXED
Submitter
schwa (unverified)
Assigned to
No-one
Submitted
10 years ago
Updated
10 years ago
Labels
bug library

schwa (unverified) 10 years ago · edit

Fixed in [7822f3b3caf7190a91c74f3363df87bd7f4b7d93](https://git.sr.ht/~sschwarzer/ftputil/commit/7822f3b3caf7190a91c74f3363df87bd7f4b7d93 "Expect time shift in 15-minute units, not hour units (ticket #81).").

Register here or Log in to comment, or comment via email.