Topic "Invalid argument to date encode"

Author Message
robw
[View user's profile]

Joined: 2007-08-08
Posts: 1
Location: South Africa
Hi

We get a error dialog with "Invalid argument to date encode"

We have been moving files between Windows (present system date 8 Aug 2007) and an AIX 5.3 test system (present system date 29 Feb 2008).
Up to date there has been no problem even with these date differences but today when the date clocked over to 29 Feb 2008 we had this problem.

WinSCP 4.0.3 (Build 345)
SCP
Norton commander
Log file snippet
* 2007-08-08 14:46:20.481 Unexpected directory listing line '-rw------- 1 root system 10004 Feb 29 14:40 .sh_history'.
* 2007-08-08 14:46:20.481 Invalid argument to date encode

WinSCP then doesn't list all files
From UNIX terminal all files visible
I can provide log - how do I attach?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
Problem is that there is no year in the listing, hence WinSCP expects it to be a 2007, making the date invalid (2007 is not a leap year). Switching to SFTP protocol should fix the problem.
_________________
Martin Prikryl
george_skj

Guest


Hi,

We are using the WINSCP 3.7.6. It is published in citix. When we work from GMT +5:00 time zone, we are able to tranfer the files from local desktop to solaris system. Some of our colleagues work from GMT -5:00 time zone. The reeives the error ' Invalid argument to date encode.

Please help to find the solution[/b]
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
First, please try to upgrade.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
For list of reasons WinSCP cannot parse directory listing and possible resolutions, see documentation.
_________________
Martin Prikryl
jsgrenon

Guest


Hi have this bug, and I have the latest version, do you fix the bug?

Thank

John
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
Make sure you have the latest version. If you do and you still experience the problem, please post a full log file showing it.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application. 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
pizzaman383
[View user's profile]

Joined: 2009-11-16
Posts: 1
martin wrote:
Make sure you have the latest version. If you do and you still experience the problem, please post a full log file showing it.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application.


The problem started happening on connections that used to work fine.

Here is the contents of the debug log:

https://pastebin.com/f38792b12
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
pizzaman383 wrote:
The problem started happening on connections that used to work fine.

Here is the contents of the debug log:

https://pastebin.com/f38792b12

I have sent you an email with debug version.
_________________
Martin Prikryl
flojo

Guest


pizzaman383 wrote:
martin wrote:
Make sure you have the latest version. If you do and you still experience the problem, please post a full log file showing it.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application.


The problem started happening on connections that used to work fine.

Here is the contents of the debug log:

https://pastebin.com/f38792b12


Excat the same problem here. All went well. Just a few days ago the problem accurs.

Thannks for the help!
lanemark

Guest


I had a similar issue, and it appeared to resolve itself after I specified a timezone in Windows. The installation of Windows 7 didnt' have a timezone set and this appeared to be causing an issue with reteiving remote directory listings.


robw wrote:
Hi

We get a error dialog with "Invalid argument to date encode"

We have been moving files between Windows (present system date 8 Aug 2007) and an AIX 5.3 test system (present system date 29 Feb 2008).
Up to date there has been no problem even with these date differences but today when the date clocked over to 29 Feb 2008 we had this problem.

WinSCP 4.0.3 (Build 345)
SCP
Norton commander
Log file snippet
* 2007-08-08 14:46:20.481 Unexpected directory listing line '-rw------- 1 root system 10004 Feb 29 14:40 .sh_history'.
* 2007-08-08 14:46:20.481 Invalid argument to date encode

WinSCP then doesn't list all files
From UNIX terminal all files visible
I can provide log - how do I attach?
flojo

Guest


lanemark wrote:
I had a similar issue, and it appeared to resolve itself after I specified a timezone in Windows. The installation of Windows 7 didnt' have a timezone set and this appeared to be causing an issue with reteiving remote directory listings.


Hi lanemark, you made my day!!! This is it. It works now after resetting the time zone.

Thanks so much!
Florian
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
Still, can anyone of you two send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
_________________
Martin Prikryl
KenInNH
[View user's profile]

Joined: 2009-11-24
Posts: 1
Location: New Hampshire
martin wrote:
Still, can anyone of you two send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.


I've run into this problem also, and would be glad to help out.
-Ken
Gyan

Guest


This may help somebody...

This error was driving me crazy. I updated to 4.1.9 with no luck. Then I updated to the latest beta 4.2.4 with, still, no luck. I saw the timezone post and was hoping that would fix it. It didn't as my XP had the timezone already set. So I tried something new...

I switched the timezone on my machine and then switched it back to the original version and now all is good.

Hopefully this will help someone.

Happy Holidays!
BernardS

Guest


Great suggestion!
I followed this path and it fixed my problem as well.
Thank you so much!!!!
Gyan wrote:
This may help somebody...

This error was driving me crazy. I updated to 4.1.9 with no luck. Then I updated to the latest beta 4.2.4 with, still, no luck. I saw the timezone post and was hoping that would fix it. It didn't as my XP had the timezone already set. So I tried something new...

I switched the timezone on my machine and then switched it back to the original version and now all is good.

Hopefully this will help someone.

Happy Holidays!
rcyeager

Guest


The same "Invalid argument to date encode" happened to me and was fixed by changing the timezone.

In my case, I had upgraded to Parallels v5 on my Macbook Pro when the problem started. I guess the upgrade changed something in the virtual machine.

Anyway, changing the Windows timezone has resolved the issue for me.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
Once again, along with reporting that you also face the issue, can anyone of you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
_________________
Martin Prikryl
skaestle
[View user's profile]

Joined: 2009-12-10
Posts: 1
martin wrote:
Once again, along with reporting that you also face the issue, can anyone of you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.


I have the same issue on Windows 7 with the latest WinSCP Version. The fix mentioned above (Setting the Regional Settings in Windows 7) cleared the issue for me too.

I've sent you an E-Mail with my details
TomH

Guest


Hello
Also for me, this problem appeared on a Macbook Pro with WinXP running in a Parallels Desktop 5 virtual machine. I installed WinSCP 4.1.9 from sourceforge.net, got the Date Encode error, quit, changed the timezone to something else and changed it back to EST, then ran WinSCP again and got through.
Tom
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
This issue has been added to tracker.
_________________
Martin Prikryl
mydish11
[View user's profile]

Joined: 2009-12-22
Posts: 1
Location: London
skaestle wrote:

I have the same issue on Windows 7 with the latest WinSCP Version. The fix mentioned above (Setting the Regional Settings in Windows 7) cleared the issue for me too.

I've sent you an E-Mail with my details


The same issue here. Have Windows 7 and the latest WinSCP.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
mydish11 wrote:
The same issue here. Have Windows 7 and the latest WinSCP.

Are you sure you have WinSCP 4.2.5?
_________________
Martin Prikryl
Guest




4.2.7 / Windows 7 here and the same problem.
Changing the timezone settings did not help in my case.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
Can you send me an email so I can send you a debug version?
_________________
Martin Prikryl
Kaspar

Guest


Just want to say to those who have this problem, and it doesn't help to change the timezone, this could be the solution:

Rightclik on one of your pictures, and see what date it had last been modified. My camera made it look like they where last modified 1970, and if I loaded the pictures into registax, I got the same error; "Invalid argument to date encode" .

I just opened the pictures in MSPAINT and saved them, without making any changes, and them I could load them into Registax without trouble.
saharhostnile
[View user's profile]

Joined: 2016-06-04
Posts: 1
Location: cairo
Hi have this bug, and I have the latest version, do you fix the bug?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
saharhostnile wrote:
Hi have this bug, and I have the latest version, do you fix the bug?

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

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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.
Mikko

Guest


I got same error. I have 2 almost identical Linux systems. One works, but another not. Here is log from the working one:
2017-03-17 12:00:55.344 Cached directory change via ".." to "/".
. 2017-03-17 12:00:55.344 Getting current directory name.
. 2017-03-17 12:00:55.344 Listing current directory.
. 2017-03-17 12:00:55.344 Locating to cached directory "/".
> 2017-03-17 12:00:55.344 cd "/" ; echo "WinSCP: this is end-of-file:$?"
. 2017-03-17 12:00:55.344 Sent 47 bytes
. 2017-03-17 12:00:55.344 There are 0 bytes remaining in the send buffer
. 2017-03-17 12:00:55.346 Waiting for another 1 bytes
. 2017-03-17 12:00:55.349 Detected network event
. 2017-03-17 12:00:55.349 Received 30 bytes (0)
. 2017-03-17 12:00:55.349 Read 1 bytes (29 pending)
. 2017-03-17 12:00:55.349 Read 29 bytes (0 pending)
< 2017-03-17 12:00:55.349 WinSCP: this is end-of-file:0
> 2017-03-17 12:00:55.349 ls -la ; echo "WinSCP: this is end-of-file:$?"
. 2017-03-17 12:00:55.349 Sent 48 bytes
. 2017-03-17 12:00:55.349 There are 0 bytes remaining in the send buffer
. 2017-03-17 12:00:55.349 Waiting for another 1 bytes
. 2017-03-17 12:00:55.379 Detected network event
. 2017-03-17 12:00:55.380 Received 1197 bytes (0)
. 2017-03-17 12:00:55.380 Read 1 bytes (1196 pending)
. 2017-03-17 12:00:55.380 Read 7 bytes (1189 pending)
< 2017-03-17 12:00:55.380 total 1
. 2017-03-17 12:00:55.380 Read 59 bytes (1130 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 18 root root 0 Jan 1 1970 .
. 2017-03-17 12:00:55.380 Read 60 bytes (1070 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 18 root root 0 Jan 1 1970 ..
. 2017-03-17 12:00:55.380 Read 61 bytes (1009 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 2 root root 0 May 3 2016 bin
. 2017-03-17 12:00:55.380 Read 61 bytes (948 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 7 root root 0 Feb 26 23:32 dev
. 2017-03-17 12:00:55.380 Read 61 bytes (887 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 15 root root 0 Jan 1 1970 etc
. 2017-03-17 12:00:55.380 Read 61 bytes (826 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 3 root root 0 Sep 7 2016 lib
. 2017-03-17 12:00:55.380 Read 70 bytes (756 pending)
< 2017-03-17 12:00:55.380 lrwxrwxrwx 1 root root 3 May 3 2016 lib32 -> lib
. 2017-03-17 12:00:55.380 Read 80 bytes (676 pending)
< 2017-03-17 12:00:55.380 lrwxrwxrwx 1 root root 11 May 3 2016 linuxrc -> bin/busybox
. 2017-03-17 12:00:55.380 Read 63 bytes (613 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 2 root root 0 Mar 1 2016 media
. 2017-03-17 12:00:55.380 Read 61 bytes (552 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 2 root root 0 Mar 1 2016 mnt
. 2017-03-17 12:00:55.380 Read 61 bytes (491 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 2 root root 0 Mar 1 2016 opt
. 2017-03-17 12:00:55.380 Read 62 bytes (429 pending)
< 2017-03-17 12:00:55.380 dr-xr-xr-x 63 root root 0 Jan 1 1970 proc
. 2017-03-17 12:00:55.380 Read 62 bytes (367 pending)
< 2017-03-17 12:00:55.380 drwx------ 7 root root 0 Feb 26 23:32 root
. 2017-03-17 12:00:55.380 Read 61 bytes (306 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 3 root root 160 Feb 26 23:32 run
. 2017-03-17 12:00:55.380 Read 62 bytes (244 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 2 root root 0 May 3 2016 sbin
. 2017-03-17 12:00:55.380 Read 61 bytes (183 pending)
< 2017-03-17 12:00:55.380 dr-xr-xr-x 12 root root 0 Jan 1 1970 sys
. 2017-03-17 12:00:55.380 Read 61 bytes (122 pending)
< 2017-03-17 12:00:55.380 drwxrwxrwt 5 root root 340 Mar 1 01:23 tmp
. 2017-03-17 12:00:55.380 Read 61 bytes (61 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 9 root root 0 Aug 8 2016 usr
. 2017-03-17 12:00:55.380 Read 61 bytes (0 pending)
< 2017-03-17 12:00:55.380 drwxr-xr-x 4 root root 0 May 3 2016 var
. 2017-03-17 12:00:55.380 Waiting for another 1 bytes
. 2017-03-17 12:00:55.575 Detected network event
. 2017-03-17 12:00:55.575 Received 30 bytes (0)
. 2017-03-17 12:00:55.575 Read 1 bytes (29 pending)
. 2017-03-17 12:00:55.575 Read 29 bytes (0 pending)
< 2017-03-17 12:00:55.575 WinSCP: this is end-of-file:0
. 2017-03-17 12:00:55.575 Reading symlink "lib32".
> 2017-03-17 12:00:55.575 ls -la -d "lib" ; echo "WinSCP: this is end-of-file:$?"
. 2017-03-17 12:00:55.575 Sent 57 bytes
. 2017-03-17 12:00:55.575 There are 0 bytes remaining in the send buffer
. 2017-03-17 12:00:55.575 Waiting for another 1 bytes
. 2017-03-17 12:00:55.593 Detected network event
. 2017-03-17 12:00:55.593 Received 61 bytes (0)
. 2017-03-17 12:00:55.593 Read 1 bytes (60 pending)
. 2017-03-17 12:00:55.593 Read 60 bytes (0 pending)
< 2017-03-17 12:00:55.593 drwxr-xr-x 3 root root 0 Sep 7 2016 lib
. 2017-03-17 12:00:55.593 Waiting for another 1 bytes

And here is log from the non-working one:
2017-03-17 11:46:53.503 Cached directory change via ".." to "/".
. 2017-03-17 11:46:53.503 Getting current directory name.
. 2017-03-17 11:46:53.503 Listing current directory.
. 2017-03-17 11:46:53.503 Locating to cached directory "/".
> 2017-03-17 11:46:53.503 cd "/" ; echo "WinSCP: this is end-of-file:$?"
. 2017-03-17 11:46:53.503 Sent 47 bytes
. 2017-03-17 11:46:53.503 There are 0 bytes remaining in the send buffer
. 2017-03-17 11:46:53.509 Waiting for another 1 bytes
. 2017-03-17 11:46:53.509 Detected network event
. 2017-03-17 11:46:53.509 Received 30 bytes (0)
. 2017-03-17 11:46:53.509 Read 1 bytes (29 pending)
. 2017-03-17 11:46:53.509 Read 29 bytes (0 pending)
< 2017-03-17 11:46:53.509 WinSCP: this is end-of-file:0
> 2017-03-17 11:46:53.509 ls -la ; echo "WinSCP: this is end-of-file:$?"
. 2017-03-17 11:46:53.509 Sent 48 bytes
. 2017-03-17 11:46:53.509 There are 0 bytes remaining in the send buffer
. 2017-03-17 11:46:53.509 Waiting for another 1 bytes
. 2017-03-17 11:46:53.538 Detected network event
. 2017-03-17 11:46:53.538 Received 1197 bytes (0)
. 2017-03-17 11:46:53.538 Read 1 bytes (1196 pending)
. 2017-03-17 11:46:53.538 Read 7 bytes (1189 pending)
< 2017-03-17 11:46:53.538 total 1
. 2017-03-17 11:46:53.538 Read 59 bytes (1130 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 18 root root 0 Jan 1 1970 .
. 2017-03-17 11:46:53.538 Read 60 bytes (1070 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 18 root root 0 Jan 1 1970 ..
. 2017-03-17 11:46:53.538 Read 61 bytes (1009 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 2 root root 0 May 3 2016 bin
. 2017-03-17 11:46:53.538 Read 61 bytes (948 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 7 root root 0 Feb 29 22:58 dev
. 2017-03-17 11:46:53.538 Read 61 bytes (887 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 15 root root 0 Jan 1 1970 etc
. 2017-03-17 11:46:53.538 Read 61 bytes (826 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 3 root root 0 Sep 7 2016 lib
. 2017-03-17 11:46:53.538 Read 70 bytes (756 pending)
< 2017-03-17 11:46:53.538 lrwxrwxrwx 1 root root 3 May 3 2016 lib32 -> lib
. 2017-03-17 11:46:53.538 Read 80 bytes (676 pending)
< 2017-03-17 11:46:53.538 lrwxrwxrwx 1 root root 11 May 3 2016 linuxrc -> bin/busybox
. 2017-03-17 11:46:53.538 Read 63 bytes (613 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 2 root root 0 Mar 1 2016 media
. 2017-03-17 11:46:53.538 Read 61 bytes (552 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 2 root root 0 Mar 1 2016 mnt
. 2017-03-17 11:46:53.538 Read 61 bytes (491 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 2 root root 0 Mar 1 2016 opt
. 2017-03-17 11:46:53.538 Read 62 bytes (429 pending)
< 2017-03-17 11:46:53.538 dr-xr-xr-x 66 root root 0 Jan 1 1970 proc
. 2017-03-17 11:46:53.538 Read 62 bytes (367 pending)
< 2017-03-17 11:46:53.538 drwx------ 7 root root 0 Feb 29 22:54 root
. 2017-03-17 11:46:53.538 Read 61 bytes (306 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 3 root root 160 Jan 1 1970 run
. 2017-03-17 11:46:53.538 Read 62 bytes (244 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 2 root root 0 May 3 2016 sbin
. 2017-03-17 11:46:53.538 Read 61 bytes (183 pending)
< 2017-03-17 11:46:53.538 dr-xr-xr-x 12 root root 0 Jan 1 1970 sys
. 2017-03-17 11:46:53.538 Read 61 bytes (122 pending)
< 2017-03-17 11:46:53.538 drwxrwxrwt 4 root root 300 Mar 1 01:05 tmp
. 2017-03-17 11:46:53.538 Read 61 bytes (61 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 9 root root 0 Aug 8 2016 usr
. 2017-03-17 11:46:53.538 Read 61 bytes (0 pending)
< 2017-03-17 11:46:53.538 drwxr-xr-x 4 root root 0 May 3 2016 var
. 2017-03-17 11:46:53.538 Waiting for another 1 bytes
. 2017-03-17 11:46:53.538 Detected network event
. 2017-03-17 11:46:53.538 Received 30 bytes (0)
. 2017-03-17 11:46:53.538 Read 1 bytes (29 pending)
. 2017-03-17 11:46:53.539 Read 29 bytes (0 pending)
< 2017-03-17 11:46:53.539 WinSCP: this is end-of-file:0
* 2017-03-17 11:46:53.555 (ECommand) Error listing directory '/'.
* 2017-03-17 11:46:53.555 Unexpected directory listing line 'drwxr-xr-x 7 root root 0 Feb 29 22:58 dev'.
* 2017-03-17 11:46:53.555 Invalid argument to date encode [2017-2-29]
. 2017-03-17 11:46:53.750 Session upkeep
. 2017-03-17 1

So difference starts from the line: . 2017-03-17 12:00:55.575 Reading symlink "lib32".
What is that? What is symlink lib32. Can this give some new hint?

For me that seems that error is caused by the Linux not the Windows.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
Mikko wrote:
I got same error. I have 2 almost identical Linux systems. One works, but another not. Here is log from the working one:

...
* 2017-03-17 11:46:53.555 Unexpected directory listing line 'drwxr-xr-x 7 root root 0 Feb 29 22:58 dev'.
* 2017-03-17 11:46:53.555 Invalid argument to date encode [2017-2-29]
. 2017-03-17 11:46:53.750 Session upkeep
. 2017-03-17 1

So difference starts from the line: . 2017-03-17 12:00:55.575 Reading symlink "lib32".
What is that? What is symlink lib32. Can this give some new hint?

For me that seems that error is caused by the Linux not the Windows.

The problem is, what the error message says:
The February didn't have 29 days this year.
Don't you have a wrong date set on the machine?
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License