TIMEZONE Declare time zone offset |
Top Previous Next |
In versions prior to v2.0, this behavior was performed using the /tz option on various commands. The /tz option is still supported but the TIMEZONE command now the recommended method for time zone management.
Use the TIMEZONE command to account for differences in time zones between Robo-FTP and the remote site by adding (or subtracting) the number of hours specified in the [ tz ] argument. This is important for accurate file date/time comparisons that occur in commands like SYNC, FILECOMPARETO and GETSITEFILE. It is also important for the SENDFILE and RCVFILE commands when they are used with options like /ifnewer. This option is unnecessary if the /precisetime option of the FTPLOGON command is used (and the remote site supports it) because it causes files to automatically be compared in UTC (GMT) format.
If you are using Robo-FTP in the Central U.S. time zone and connect to remote site in London, England that reports file date/time stamps in GMT (Greenwich Mean Time) then there is a six-hour difference between the local file system and the remote site. If two files were created at exactly the same moment, one in Central time and and the other in GMT then the file in GMT would have a timestamp 6 hours older. So, if you were in Central time, you could use the following command to subtract 6 hours from all file times reported by the remote server:
TIMEZONE -6
If you are using Robo-FTP in the Central U.S. time zone and a FTP site returns dates based on the Eastern U.S. time zone then there is a one-hour difference between the local file system and the remote site. You could use the following command to subtract 1 hour from all files times reported by the server:
TIMEZONE -1
Finally, assuming the Robo-FTP PC is still in Central time, if a FTP site returns dates based on the Pacific time zone then there is a two-hour difference the other way. Use the following syntax to add two hours to all times reported by the server:
TIMEZONE +2
Variables can also be used:
SET tz = "+2" TIMEZONE tz
You can reset the time zone offset by calling TIMEZONE without the [ tz ] argument:
TIMEZONE
Note: The time zone offset is ignored when Robo-FTP is able to communicate with a remote server using methods that, by definition, always return time in UTC format. For example, FTP and FTPS sites that support the MLSD raw FTP command.
Related command(s): SYNC, FILECOMPAREFROM, FILECOMPARETO, SENDFILE, RCVFILE See also: Timezone Differences |