Time zones and put -neweronly

Advertisement

pshute
Joined:
Posts:
2
Location:
Australia

Time zones and put -neweronly

I'm regularly uploading files to a site, and the uploaded files get a timestamp of the current time but in another time zone, which is 5 hours behind mine. I'm using the "put -neweronly ..." command (with winscp.com v5.13.7 build 9125), but some (not all) previously uploaded files get uploaded every time.

I think this is because if I upload a file less than 5 hours old, its local time stamp will appear newer than the remote one forever.

Is there a way around this?

I don't know if more information is required, but this is from the Server and protocol information:
Remote system = UNIX Type: L8
File transfer protocol = FTP
Cryptographic protocol = TLS/SSL Implicit encryption, TLSv1.2
Encryption algorithm = TLSv1/SSLv3: ECDHE-RSA-AES128-SHA256, 2048 bit RSA, ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(128)  Mac=SHA256
Compression = No
Can change permissions = Yes
Can change owner/group = No
Can execute arbitrary command = Protocol commands only
Can create symbolic/hard link = No/No
Can lookup user groups = No
Can duplicate remote files = No
Can check available space = No
Can calculate file checksum = No
Native text (ASCII) mode transfers = No
------------------------------------------------------------
Can change permissions = Yes
Can change owner/group = No
Can execute arbitrary command = Protocol commands only
Can create symbolic/hard link = No/No
Can lookup user groups = No
Can duplicate remote files = No
Can check available space = No
Can calculate file checksum = No
Native text (ASCII) mode transfers = No
------------------------------------------------------------
Additional information
The server supports these FTP additional features:
  EPSV
  MDTM
  PASV
  REST STREAM
  SIZE
  UTF8
  PBSZ
  PROT
  X-NOVELLABS
  X-CITRIX

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,605
Location:
Prague, Czechia

Re: Time zones and put -neweronly

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,605
Location:
Prague, Czechia

The two uploads are inconsistent, because the first time, there's no file in the target server, and WinSCP cannot detect timezone difference. While second time, there's the previously uploaded file, which WinSCP uses to detect the difference.

You can fix that by explicitly telling WinSCP what the timezone offset is:
https://winscp.net/eng/docs/ui_login_environment
https://winscp.net/eng/docs/rawsettings#timedifference

Reply with quote

Advertisement

You can post new topics in this forum