Opened 7 years ago
Closed 7 years ago
#81 closed defect (fixed)
Round timezone differences to 15-minute units, not hours
Reported by: | schwa | Owned by: | schwa |
---|---|---|---|
Priority: | minor | Milestone: | 3.1 |
Component: | Library | Version: | 3.0 |
Keywords: | time shift, synchronize_times, time zone, set_time_shift | Cc: |
Description
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.
Change History (2)
comment:1 Changed 7 years ago by
Status: | new → assigned |
---|---|
Summary: | Round timezone differences to 15 minute units, not hours → Round timezone differences to 15-minute units, not hours |
comment:2 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in [ce5c6ccebd47].