Page 1 of 1

wrong time with own ftp servertype

Posted: 2009-06-09, 08:10 UTC
by Bandit
Hello,

i must use an own servertyp definition for ftp.
The Server sends e.g. 00:13PM for 12:13 and the total commander interpreted this as 00:13AM (midnight).
I think that the commander ignore the PM flag when the hour is 0.
Is that a bug from the commander or from our server? Or both?
Is it practicable to generate a new flag to interpret 00:13PM as 12:13?

thanks,
Frank

Posted: 2009-06-09, 10:30 UTC
by ghisler(Author)
How does your custom server type string looks like? The time must be defined like this:
hh mmH

The uppercase 'H' stands for the AM/PM indicator. If there is a 'p' or 'P', the time will be interpreted as PM.

Posted: 2009-06-09, 12:45 UTC
by Bandit
The string looks like:

Code: Select all

06-08-09  00:47PM                            16192 0000272.PDL
06-08-09  01:43PM                            16192 0000273.PDL
06-08-09  01:41PM           <DIR>                  0000274
06-08-09  02:37PM                            16192 0000275.PDL
I use this definition to interpret the strings:

Code: Select all

Template1=MM-DD-YY$hh:mmH $S*$n*
Template2=MM-DD-YY$hh:mmH $<d!$n*
The time of the first file is then 00:47, from the next is 13:43, 13:41, 14:37.

Its my first time to use the server type definition, but i think its correct.

Posted: 2009-06-09, 18:55 UTC
by MVV
Usually value 12 PM used instead of 00 PM. And value 00 is unused. So, I think it may be processed specially. For example, we may take (hour%12) always and consider 0 PM as noon.

Posted: 2009-06-10, 16:06 UTC
by ghisler(Author)
Indeed there is no time 00:xx PM, so TC doesn't know how to handle it correctly and just treats it like 00:xx AM. Looks like a bug in the server...

Edit: I have just checked my code, it's exactly as I wrote. I will try to interpret 00:xx PM as 12:xx PM.