Lobuno
Lobuno

Reputation: 1405

Indy idftp client "Invalid argument to time encode"

Using Delphi 2010 and Indy 10.5.8.0.

Against the server Titan FTP I'm getting all the time the exception "Invalid argument to time encode" (EConvertError) when connecting.

The server log tells me:

FEAT<EOL>
211-Extensions Supported<EOL> COMB<EOL> MLST type*;size*;modify*;create*;perm*;<EOL>    SIZE<EOL> MDTM<EOL> XCRC<EOL> REST STREAM<EOL> AUTH SSL<EOL> AUTH TLS<EOL> CCC<EOL> PBSZ<EOL> PROT<EOL> EPRT<EOL> EPSV<EOL> DQTA<EOL>211 End<EOL>
TYPE A<EOL>
200 Type set to A.<EOL>
The user "*****" has initiated a session on "217.********:21"
SYST<EOL>
215 UNIX Type: L8<EOL>
SITE ZONE<EOL>
210 UTC-2147483647<EOL>
QUIT<EOL>
221 Session Ended. Downloaded 0KB, Uploaded 0KB. Goodbye *** from 130.******.<EOL>

Any ideas?

Upvotes: 2

Views: 2356

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 597036

The server is sending a faulty UTC offset in response to the SITE ZONE command. That is a bug in Titan. When Indy tries to parse the value for use in later TDateTime operations, the parse fails. Contact the Titan devs and let them know about the bug. In the meantime, I will look into updating TIdFTP to handle that error in the future.

Upvotes: 4

Related Questions