Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Re: Synchronization file time incorrect

magicguru wrote:

if you synchronize files through the GUI, the time of the file is correct on the destination, however if you synchronize files through a script the time of the file is incorrect when it downloaded from the SFTP – it is UTC – preservetime and criteria have been set to try to alleviate this but the issue still persists
synchronize local -preservetime -criteria=<none>



if you synchronize files through the GUI, the time of the file is correct on the destination, however if you synchronize files through a script the time of the file is incorrect when it downloaded from the SFTP – it is UTC – preservetime and criteria have been set to try to alleviate this but the issue still persists


Hi,

this behavior usually happens because the script mode (command-line or .NET assembly) treats file timestamps strictly in UTC, while the GUI automatically applies your local timezone offset. That’s why you see correct times in the GUI but not in automation.

A few things to check/try:

1. **Session option**
martin

Re: Synchronization file time incorrect

Then you must have the "Adjust remote timestamp with DST" configured in the GUI at the time you have generated the code.
But now your GUI session has the default "Adjust remote timestamp to local conventions" selected.

If you have a different experience, please post some screenshots documenting that.
magicguru

Re: Synchronization file time incorrect

Thanks. That has worked

BTW the Generate Session URL/Code Example Script added these at the end of the first line
martin

Re: Synchronization file time incorrect

You have explicitly asked for the different behaviour in your script using:
open ... -rawsettings ConsiderDST=0

Just remove the -rawsettings ConsiderDST=0.
magicguru

Synchronization file time incorrect

see attached example showing the incorrect file time - the file was uploaded at 11:07 - when it is downloaded the file time is 10:07
magicguru

Synchronization file time incorrect

Script
synchronize local -delete -preservetime -criteria=none C:\ABC_TestFolder\ /TO_RSW/TestFolder
magicguru

Synchronization file time incorrect

GUI log
martin

Re: Synchronization file time incorrect

Please post session log files both from GUI and script showing synchronization of the same file with different results.

Btw, it's -criteria=none, not -criteria=<none>.
magicguru

Synchronization file time incorrect

if you synchronize files through the GUI, the time of the file is correct on the destination, however if you synchronize files through a script the time of the file is incorrect when it downloaded from the SFTP – it is UTC – preservetime and criteria have been set to try to alleviate this but the issue still persists
synchronize local -preservetime -criteria=<none>