Ошибка invalid argument to date encode

Среда разработки Delphi 7. ОС Windows 7 x64.
Система проверена антивирусом KIS8 с актуальными БД — вирусов нет. Антивирус не отключаю вообще.
Обновления системы отключены. Ничего нового не устанавливал. К компьютеру доступ только у меня.

Такой ошибки раньше не было. Эта ошибка появилась сегодня, во всех проектах, при запуске любых exe написанных на Delphi ( где используется DateTimePicker, при шелчке по стрелкам).
Запуск exe без компиляции.

Ошибка появилась в программах, которые создал вчера и месяц назад и сегодня. Везде, где используется DateTimePicker — где изменяем его значение.

Пример
Создаю новый проект, помещаю на форму компонент DateTimePicker.
Изменяю его свойства:
Format MM.yyyy
DateMode dmUpDown.
Далее, если нажать стрелку вниз 2 раза — появится эта ошибка ( окно дебагера или окно сообщения, при запуске exe — invalid argument to date encode).
Первый раз дата изменится, второй — окно с ошибкой. После нажатия ok — дата в поле сотрется ( . )

1703c75fbdea41cfb53458c75f0fadd4.jpg

Заметил, что если изменить свойства DateMode с выставленного мною dmUpDown на дефолтное dmUpDown — ошибка исчезнет.
Ошибка не появляется, если изменять с помощью стрелок год. А если месяц (как выделено на картинке 08) — то появляется.
Что это такое и почему появилась ошибка?

I am using TIdHTTP from Indy. I am issuing 2 different requests, one header contains the ‘Last-Modified’ tag, the other one does not. The header with the tag, throws an exception:

'Invalid Argument to date encode'

I already came across this question where Remy Lebeau said, that TIdHttp is now able to parse ISO8601 dates, but it doesnt seem to work for me. As you can see below, i am not doing anything with the component other than changing the UserAgent. Am I missing something?

url :=  'https://api.priceapi.com/v2/jobs/' + JobID+ '?token=' + Token;
http := TIdHTTP.Create(nil);
http.Request.UserAgent := 'XXXXX'; //Some UserAgent
try
  ssl := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
  try
    http.IOHandler := ssl;
    try
      jo := TJsonObject.ParseJSONValue(http.get(url)) as TJSONObject;
      result := jo.GetValue('status').Value;
    finally
    end;
  finally
    ssl.Free;
  end;
finally
  http.Free;
end;

Header with Last-Modified:

Cache-Control: no-cache
Content-Disposition: attachment; 
filename="20181025145103_google_shopping_de_5bd1d857bbd7e520c12841d7.json"
Content-Transfer-Encoding: binary
Content-Type: application/json
Last-Modified: 2018-10-25 14:51:23 +0000
Vary: Origin
X-Accel-Buffering: no
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: b05aa8fe-7ea9-4152-8470-a75f9816549f
X-Runtime: 0.099212
X-XSS-Protection: 1; mode=block
transfer-encoding: chunked
Connection: keep-alive

Header without Last-Modified:

Cache-Control: max-age=0, private, must-revalidate', nil
Content-Type: application/json; charset=utf-8', nil
ETag: W/"43c4a8865a5ebe565f3920779a962e93"', nil
Vary: Origin', nil
X-Content-Type-Options: nosniff', nil
X-Frame-Options: SAMEORIGIN', nil
X-Request-Id: 344ac82e-0d14-4838-ae7e-627c79b78edc', nil
X-Runtime: 0.062357', nil
X-XSS-Protection: 1; mode=block', nil
Content-Length: 157', nil
Connection: Close', nil

StackTrace:

:744717d2 KERNELBASE.RaiseException + 0x62
HIWBase.System.SysUtils.ConvertError($3B68860)
HIWBase.System.SysUtils.EncodeDate(???,???,???)
HIWBase.IdGlobalProtocols.RawStrInternetToDateTime('07:53:37 +0000',0)
HIWBase.IdGlobalProtocols.GMTToLocalDateTime('07:53:37 +0000')
HIWBase.IdHTTPHeaderInfo.TIdEntityHeaderInfo.ProcessHeaders
HIWBase.IdHTTPHeaderInfo.TIdResponseHeaderInfo.ProcessHeaders
HIWBase.IdHTTP.TIdHTTPProtocol.RetrieveHeaders(255)
HIWBase.IdHTTP.TIdCustomHTTP.DoRequest('GET','My URL',nil,$ADF09E0,(...))
HIWBase.IdHTTP.TIdCustomHTTP.Get('My URL',$ADF09E0,(...))
HIWBase.IdHTTP.TIdCustomHTTP.Get('My URL',(...))
HIWBase.IdHTTP.TIdCustomHTTP.Get('My URL')

I am on Indy version 10.6.2.5311


Форум программистов Vingrad

Модераторы: Snowy, MetalFan, bems, Poseidon

Поиск:

Ответ в темуСоздание новой темы
Создание опроса
> Вычитание дат 

:(

   

Опции темы

Janger
  Дата 24.6.2013, 10:01 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Новичок

Профиль
Группа: Участник
Сообщений: 43
Регистрация: 17.6.2013

Репутация: 1
Всего: 1

Такая проблема….
У меня определённая дата записывается в текстовый документ, а потом, я хочу определить, сколько дней прошло с выбранной даты…
Вот мой код… Подскажите, что я не так делаю…(

Код

var
    date: string;
    myFile : TextFile;
    text : string;
begin
AssignFile(myFile, ExtractFilePath(Application.ExeName)+'on_off.txt');
Reset(myFile);
ReadLn(myFile, text);
date:=DateToStr(Now);
Edit1.Text:=text-date;
CloseFile(myFile);}
end;

================================
text = 04.06.2014
date = 24.06.2013 (сегодняшняя дата)
================================
И естественно в Edit1 у меня ничего не отображается….
Подскажите пожалуйста(( 

PM MAIL   Вверх
kakawkin
Дата 24.6.2013, 11:49 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Новичок

Профиль
Группа: Участник
Сообщений: 18
Регистрация: 23.6.2010

Репутация: нет
Всего: нет

Код

DaysBetween(const ANow, AThen: TDateTime): Integer;

PM MAIL   Вверх
Janger
Дата 24.6.2013, 13:24 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Новичок

Профиль
Группа: Участник
Сообщений: 43
Регистрация: 17.6.2013

Репутация: 1
Всего: 1

Жаль, что никто не помог….
Но я код выложу, вдруг, кому то будет полезно….

Код

var
    date,li: TDateTime;
    myFile : TextFile;
    text : string;
begin
AssignFile(myFile, ExtractFilePath(Application.ExeName)+'on_off.txt');
Reset(myFile);
ReadLn(myFile, text);
li:=StrTodateTime(text);
date:=StrToDateTime(DateToStr(Now));
ShowMessage(IntToStr(DaysBetween(li,date))+'дней');
CloseFile(myFile);
end;

Добавлено через 9 минут и 45 секунд
Тему в принципе можно закрыть… 
Я просто тут не давно, так что не знаю, может можно это как то самому сделать…

PM MAIL   Вверх
bems
Дата 24.6.2013, 13:35 (ссылка)
|    (голосов:4)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Эксперт
****

Профиль
Группа: Комодератор
Сообщений: 3400
Регистрация: 5.1.2006

Репутация: 18
Всего: 88

Цитата(Janger @  24.6.2013,  13:24 Найти цитируемый пост)
date:=StrToDateTime(DateToStr(Now));

тут есть что-то лишнее

———————

Обижено школьников: 8

PM MAIL   Вверх
northener
Дата 24.6.2013, 13:47 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Эксперт
***

Профиль
Группа: Завсегдатай
Сообщений: 1361
Регистрация: 2.9.2010

Репутация: 12
Всего: 20

Цитата(bems @  24.6.2013,  13:35 Найти цитируемый пост)
тут есть что-то лишнее

Это слишком мягко сказано. smile

———————

Но только лошади летают вдохновенно.
Иначе лошади разбились бы мгновенно!

PM MAIL   Вверх
Sharhan
Дата 20.9.2013, 12:17 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Новичок

Профиль
Группа: Участник
Сообщений: 11
Регистрация: 25.10.2009

Репутация: нет
Всего: нет

У меня тоже проблемы с датами.

Код

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, Buttons, Menus, Dateutils;

Код

var
   myDate : TDateTime;
   myDay : string;
begin
   myDate := EncodeDate(StrToInt(Edit6.Text), StrToInt(ComboBox16.Items.Strings[ComboBox16.ItemIndex]), StrToInt(ComboBox15.Items.Strings[ComboBox15.ItemIndex]));
   myDay := LongDayNames[DayOfWeek(myDate)];
   Memo1.Lines.Add ('День недели: ' +  myDay);
end;

В Edit6.Text вводим год. В ComboBox16.Items.Strings[ComboBox16.ItemIndex] находится номер месяца, список там от 01 до 12. В ComboBox15.Items.Strings[ComboBox15.ItemIndex] выбираем из списка число дня, список там от 1 до 31.
Компилируется отлично, без всяких сообщений об ошибках.
После нажатия кнопки в программе в форме появляется строка, в которой указывается название дня недели, всё правильно. Но при этом выводится поверх еще окно с надписью: «Invalid argument to date encode». Нажимаешь «ОК» и закрываешь окно. В принципе всё работает, но это всплывающее окно надоедает.
Что я не так делаю? Можно как-то от этого окна избавиться?
Пробовал изменить одну строку и даписать дату так:

Код

   myDate := EncodeDate(1988, 09, 13);

Только программа опять расчитала все правильно и выдала тоже дополнительное окно с надписью: «Invalid argument to date encode».
Операционная система: Система: Microsoft Windows XP Professional версия 2002 Service Pack 3 со всеми последними обновлениями.
Программирую на Делфи 7.

Это сообщение отредактировал(а) Sharhan — 20.9.2013, 12:19

PM   Вверх
Poseidon
Дата 20.9.2013, 12:54 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Delphi developer
****

Профиль
Группа: Комодератор
Сообщений: 5273
Регистрация: 4.2.2005
Где: Гомель, Беларусь

Репутация: 9
Всего: 133

Вот жаль нет возможности проверить на D7, но что-то мне подсказывает, что Dateutils тут лишний, т.к. и EncodeDate, и LongDayNames, и DayOfWeek объявлены в SysUtils. Наверно все-таки в Dateutils есть своя EncodeDate, которая работает «не так». Хотя вот в XE3 нету, но может в семерке еще была.

PS. Конструкции вида ComboBox16.Items.Strings[ComboBox16.ItemIndex] безусловно красивы, но у ComboBox, так же как и у Edit, есть свойство Text.

———————

Если хочешь, что бы что-то работало — используй написанное, 
если хочешь что-то понять — пиши сам

PM MAIL ICQ   Вверх
Sharhan
Дата 20.9.2013, 14:05 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Новичок

Профиль
Группа: Участник
Сообщений: 11
Регистрация: 25.10.2009

Репутация: нет
Всего: нет

Цитата(Poseidon @  20.9.2013,  13:54 Найти цитируемый пост)
что-то мне подсказывает, что Dateutils тут лишний, т.к. и EncodeDate, и LongDayNames, и DayOfWeek объявлены в SysUtils.

Вы правы. Dateutils я добавил в качестве эксперимента, но и до добавления всплывало это сообщение. Так что проблема осталась.

PM   Вверх
Poseidon
Дата 20.9.2013, 15:04 (ссылка)
   | (голосов:1)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Delphi developer
****

Профиль
Группа: Комодератор
Сообщений: 5273
Регистрация: 4.2.2005
Где: Гомель, Беларусь

Репутация: 9
Всего: 133

Локализуй и скинь сюда pas в таком случае, будем смотреть. Я вот пробую на D5 твой код, все работает без сообщений.

———————

Если хочешь, что бы что-то работало — используй написанное, 
если хочешь что-то понять — пиши сам

PM MAIL ICQ   Вверх
Akella
Дата 20.9.2013, 15:51 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Творец
****

Профиль
Группа: Модератор
Сообщений: 18485
Регистрация: 14.5.2003
Где: Корусант

Репутация: 8
Всего: 329

Цитата(Janger @  24.6.2013,  13:24 Найти цитируемый пост)
date:=StrToDateTime(DateToStr(Now));

Вы пишите в высшей мере несознательно. Вы пишите просто так, совсем не думая, какой тип имеет date, что такое StrToDateTime и DateToStr

И совет.
Не называйте переменную именем date, назовите, например, _date или date1. А лучто что-то типа dtStart или dtEnd. Используйте кроме имёт ещё и префиксы/суффиксы. Почитайте обязательно об именовании переменных, объектов, компонент и т.д.

Это связано с тем, что date содержит текущую дату.
date — текущая дата.
time — текущее время.
now — текущие время и дата.

Например, как показать текущую дату:

Код

procedure TfmMain.Button1Click(Sender: TObject);
begin
  ShowMessage(DateToStr(Date));
end;

А у Вас получается, что Вы перегоняете дату сначала в строку, потом из строки опять в дату.

Добавлено через 1 минуту и 25 секунд

Цитата(Poseidon @  20.9.2013,  15:04 Найти цитируемый пост)
скинь сюда pas

Вместо того, чтобы дать ему рыбу, ты лучше научи её ловить.

Добавлено через 3 минуты и 30 секунд

Цитата(Akella @  20.9.2013,  15:51 Найти цитируемый пост)
И совет.
Не называйте переменную именем date

Да, и не читайте за обедом советских газет.

PM MAIL   Вверх
Poseidon
Дата 20.9.2013, 15:56 (ссылка)
|    (голосов:1)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Delphi developer
****

Профиль
Группа: Комодератор
Сообщений: 5273
Регистрация: 4.2.2005
Где: Гомель, Беларусь

Репутация: 9
Всего: 133

Цитата(Akella @  20.9.2013,  15:51 Найти цитируемый пост)
Вместо того, чтобы дать ему рыбу, ты лучше научи её ловить.

Я не вижу в коде 

Код
myDate := EncodeDate(1988, 09, 13);

«рыбы». Вполне возможно что это его «Invalid argument to date encode» вываливается совершенно в другом месте.

———————

Если хочешь, что бы что-то работало — используй написанное, 
если хочешь что-то понять — пиши сам

PM MAIL ICQ   Вверх
Sharhan
Дата 21.9.2013, 13:31 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Новичок

Профиль
Группа: Участник
Сообщений: 11
Регистрация: 25.10.2009

Репутация: нет
Всего: нет

Цитата(Poseidon @  20.9.2013,  16:56 Найти цитируемый пост)
Вполне возможно что это его «Invalid argument to date encode» вываливается совершенно в другом месте.

Благодарю за подсказку. Был уверен, что ошибка кралась именно в этих строчках. Конечно можно было бы вложить исходник целиком, но кому надо разбираться в полуторатысячах строчек чужого кода…
В общем, решил создать новый проект, где будет реализован только вывод названия дня недели. И к удивлению обнаружил, что тот же самый код в новой программе действительно нормально работает, без всяких сообщений.
Залез в основной проект и удалил вообще эти строки из кода, чтоб было, как раньше. Но после компиляции и запуска создания отчета опять выслыло тоже самое сообщение об ошибке.
А теперь, как говорит М. Задорнов, наберите воздуха в грудь. Ошибка была в самом конце исходника, там где я просисал обнуление всех данных. Если программу нужно использовать повторно, то старые данные в переменных будут сильно мешать и я их обнуляю. Так вот, я случайно прописал еще и обнуление переменной «myDate». Видимо не очень корректно это сделал или вообще этого нельзя было делать… После удаления этой строчки из очистки данных, всё заработало отлично.

PM   Вверх
kami
Дата 21.9.2013, 20:23 (ссылка)
| (нет голосов)
Загрузка ... Загрузка …




Быстрая цитата

Цитата

Эксперт
***

Профиль
Группа: Завсегдатай
Сообщений: 1806
Регистрация: 25.8.2007
Где: Санкт-Петербург

Репутация: 22
Всего: 72

Цитата(Sharhan @  21.9.2013,  13:31 Найти цитируемый пост)
Видимо не очень корректно это сделал или вообще этого нельзя было делать…

Ага. Зачем разбираться, что именно было написано не так — проще удалить и в следующих проектах опять натыкаться на эти же грабли.

Цитата(Sharhan @  21.9.2013,  13:31 Найти цитируемый пост)
Был уверен, что ошибка кралась именно в этих строчках.

F7, F8, брейкпоинты и callstack придумали трусы…  smile 

PM MAIL WWW   Вверх



















Ответ в темуСоздание новой темы
Создание опроса
Правила форума «Delphi: Для новичков»
SnowyMetalFan
bemsPoseidon
Rrader

Запрещается!

1. Публиковать ссылки на вскрытые компоненты

2. Обсуждать взлом компонентов и делиться вскрытыми компонентами

  • Литературу по Дельфи обсуждаем здесь
  • Действия модераторов можно обсудить здесь
  • С просьбами о написании курсовой, реферата и т.п. обращаться сюда
  • Вопросы по реализации алгоритмов рассматриваются здесь
  • 90% ответов на свои вопросы можно найти в DRKB (Delphi Russian Knowledge Base) — крупнейшем в рунете сборнике материалов по Дельфи


Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Snowy, MetalFan, bems, Poseidon, Rrader.

 

0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Delphi: Для новичков | Следующая тема »

Invalid argument to date encode

  • Reply to topic
  • Log in

Advertisement

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

2007-08-08 14:52

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:
2002-12-10
Posts:
39,027
Location:
Prague, Czechia

2007-08-13

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

2007-09-04 15:02

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

martin◆

Site Admin
martin avatar

2007-09-07

First, please try to upgrade.

Reply with quote

martin◆

Site Admin
martin avatar

2008-02-14

For list of reasons WinSCP cannot parse directory listing and possible resolutions, see documentation.

Reply with quote

Advertisement

jsgrenon

Guest

2009-11-11 04:13

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:
2002-12-10
Posts:
39,027
Location:
Prague, Czechia

2009-11-12

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:
2009-11-16
Posts:
1

2009-11-16 16:05

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

martin◆

Site Admin
martin avatar
Joined:
2002-12-10
Posts:
39,027
Location:
Prague, Czechia

2009-11-18

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.

Reply with quote

Advertisement

flojo

Guest

2009-11-18 17:30

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

2009-11-19 17:14

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

2009-11-19 21:32

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:
2002-12-10
Posts:
39,027
Location:
Prague, Czechia

2009-11-23

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:
2009-11-24
Posts:
1
Location:
New Hampshire

2009-11-24 17:48

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

2009-11-25 20:23

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

2009-11-27 17:28

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

2009-11-27 21:02

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:
2002-12-10
Posts:
39,027
Location:
Prague, Czechia

2009-11-30

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:
2009-12-10
Posts:
1

2009-12-10 10:32

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

2009-12-15 20:07

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

martin◆

Site Admin
martin avatar

2009-12-16

This issue has been added to tracker.

Reply with quote

Advertisement

mydish11
Joined:
2009-12-22
Posts:
1
Location:
London

2009-12-23 12:09

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

2009-12-26

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

2010-08-30 02:03

4.2.7 / Windows 7 here and the same problem.

Changing the timezone settings did not help in my case.

Reply with quote

martin◆

Site Admin
martin avatar

2010-08-31

Can you send me an email so I can send you a debug version?

Reply with quote

Advertisement

Kaspar

Guest

2016-06-03 08:35

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

saharhostnile
Joined:
2016-06-04
Posts:
1
Location:
cairo

2016-06-04 19:41

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

Reply with quote

martin◆

Site Admin
martin avatar
Joined:
2002-12-10
Posts:
39,027
Location:
Prague, Czechia

2016-06-06

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

2017-03-17 11:19

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:
2002-12-10
Posts:
39,027
Location:
Prague, Czechia

2017-03-20

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

  • Reply to topic
  • Log in

You can post new topics in this forum

Студворк — интернет-сервис помощи студентам

Никогда такой ошибки не было. Ошибка появилась сегодня, во всех проектах, при запуске любых exe написанных на Delphi.
И тех которые создал вчера и месяц назад и сегодня.
Все проверил антивирусом KIS с актуальныби базами. Вирусов нет. Антивирь не отключаю вообще.

Delphi 7.
Создаю новый проект, помещаю на форму компонент DateTimePicker.
Изменяю его свойства:
Format MM.yyyy
DateMode dmUpDown.
Далее, если нажать стрелку вниз 2 раза — появится эта ошибка ( invalid argument to date encode). Первый раз дата изменится, второй — ошибка. Дата в поле сотрется ( . )

Заметил, что если изменить свойства DateMode с выставленного мною dmUpDown на дефолтное dmUpDown — ошибка исчезнет.

Что это такое и почему появилась ошибка?

  • Ошибка internet explorer обнаружена ошибка
  • Ошибка internal provider error market csgo
  • Ошибка internal power error windows 10 как исправить
  • Ошибка internal exception java io ioexception удаленный хост принудительно разорвал соединение
  • Ошибка internal exception io netty handler timeout readtimeoutexception