Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#28 Incorrect dates

open
nobody
None
5
2002-03-15
2002-03-15
Anonymous
No

When mounting a directory, I see the dates of all files
and directories inside are December 31. The year and
hour are OK, but day and month are not. My system's
locale is es_ES@euro, but I don't think that influences
the kernel.
Please someone report if he has the same problem or has
not the problem.

# uname -a
Linux debian 2.4.17 #1 mié feb 27 17:05:50 CET 2002
i686 unknown

Discussion

  • Logged In: NO

    I am the guy who wrote the bug report. I have found what is
    happening. The server I was connecting also has locale to
    "es_ES". See the difference in a "ls" in a ftp session:

    With LANG="C" (in the remote system):
    -rw-r--r-- 1 1001 0 3125465 Mar 14 23:27 ls-lR.gz

    With LANG="es_ES":
    -rw-rw-r-- 1 root sys 585 3 Dic 1999 .xftprc

    See the difference? The day and month are swaped, and the
    month names are different. Look at this in ftpfs sources
    (proc.c):
    static char* months[] = {"Jan", "Feb", "Mar", "Apr", "May",
    "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

    I suggest to add an argument to ftpfs for selecting the
    locale in the remote system, change the "months" string
    accordingly, and, if locale says so, swap the month and day
    possition when reading ls's output.