wrong time with own ftp servertype

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Bandit
Junior Member
Junior Member
Posts: 8
Joined: 2003-07-27, 11:30 UTC

wrong time with own ftp servertype

Post 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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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.
Author of Total Commander
https://www.ghisler.com
Bandit
Junior Member
Junior Member
Posts: 8
Joined: 2003-07-27, 11:30 UTC

Post 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.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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.
Author of Total Commander
https://www.ghisler.com
Post Reply