Invalid argument to date encode

Advertisement

robw
Joined:
Posts:
1
Location:
South Africa

Invalid argument to date encode

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: Invalid argument to date encode

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.

Reply with quote

george_skj
Guest

Invalid argument to date encode

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]

Reply with quote

Advertisement

jsgrenon
Guest

Invalid argument to date encode

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

Thank

John

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
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.

Reply with quote

pizzaman383
Joined:
Posts:
1

I have a similar problem.

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

Reply with quote

Advertisement

flojo
Guest

Re: I have a similar problem.

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!

Reply with quote

lanemark
Guest

Re: Invalid argument to date encode

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?

Reply with quote

flojo
Guest

Re: Invalid argument to date encode

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: Invalid argument to date encode

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.

Reply with quote

Advertisement

KenInNH
Joined:
Posts:
1
Location:
New Hampshire

Re: Invalid argument to date encode

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

Reply with quote

Gyan
Guest

Regarding Timezone fix...

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!

Reply with quote

BernardS
Guest

Re: Regarding Timezone fix...

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!

Reply with quote

rcyeager
Guest

Same thing here

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: Invalid argument to date encode

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.

Reply with quote

skaestle
Joined:
Posts:
1

Re: Invalid argument to date encode

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

Reply with quote

TomH
Guest

Same for me - Parallels

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

Reply with quote

Advertisement

mydish11
Joined:
Posts:
1
Location:
London

Re: Invalid argument to date encode

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.

Reply with quote

martin
Site Admin
martin avatar

Re: Invalid argument to date encode

mydish11 wrote:

The same issue here. Have Windows 7 and the latest WinSCP.
Are you sure you have WinSCP 4.2.5?

Reply with quote

Guest

Re: Invalid argument to date encode

4.2.7 / Windows 7 here and the same problem.
Changing the timezone settings did not help in my case.

Reply with quote

Advertisement

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
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.

Reply with quote

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
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?

Reply with quote

Advertisement

You can post new topics in this forum