Changeset 795:743125307fe7


Ignore:
Timestamp:
May 9, 2009, 12:33:09 PM (10 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Convert:
svn:778c30c8-61e0-0310-89d4-fe2f97a467b2/trunk@863
Message:
Note that the time shift can be different from zero even if client
and server are in the same time zone.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil.txt

    r794 r795  
    429429
    430430  If it seems that a file is downloaded unnecessarily, read the
    431   subsection on `time shift`_ settings.
     431  subsection on `time zone correction`_.
    432432
    433433.. _`time shift`:
     434.. _`time zone correction`:
    434435
    435436Time zone correction
    436437````````````````````
     438
     439If the client (where ``ftputil`` runs) and the server have a different
     440understanding of local time, this has to be taken into account for
     441``upload_if_newer`` and ``download_if_newer`` to work correctly.
     442
     443Note that even if the client and the server are in the same time zone
     444(or even on the same computer), the time shift value (see below) may
     445be different from zero. For example, my computer is set to use local
     446time whereas the server insists on using UTC time.
    437447
    438448.. _`set_time_shift`:
     
    557567
    558568If ``lstat`` or ``stat`` yield wrong modification dates or times, look
    559 at the methods that deal with time zone differences (`time shift`_).
     569at the methods that deal with time zone differences (`time zone
     570correction`_).
    560571
    561572.. _`FTPHost.lstat`:
     
    844855
    845856  *Note the leading zero.*
    846  
     857
    847858  Not all FTP servers support the ``chmod`` command. In case of
    848859  an exception, how do you know if the path doesn't exist or if
     
    852863  response to a ``CommandNotImplementedError`` which is derived from
    853864  ``PermanentError``.
    854  
     865
    855866  So you need to code like this::
    856867
     
    12101221unnecessarily, or not when it should. This can happen when the FTP
    12111222server is in a different time zone than the client on which
    1212 ``ftputil`` runs. Please see the section on setting the
    1213 `time shift`_. It may even be sufficient to call `synchronize_times`_.
     1223``ftputil`` runs. Please see the section on `time zone correction`_.
     1224It may even be sufficient to call `synchronize_times`_.
    12141225
    12151226Wrong dates or times when stat'ing on a server
Note: See TracChangeset for help on using the changeset viewer.