TimeZone in ls -lna listings

olle ollesson bpsr77 at hotmail.com
Thu Sep 21 23:50:59 EST 2006


Hi,

I have a strange situation where when I get different timestamps depending 
on if a use ls -l or ls -ln:


---------------

sftp> ls -l
-rw-rw-rw-   1 0        0           39649 Sep 20 11:30 
C20060920.1115-20060920.1130

sftp> ls -ln
-rw-------    0 0        0           39649 Sep 20 13:30 
C20060920.1115-20060920.1130

--------------

The machine is in timezone UTC+2. According to the sftp draft timestamps 
should be in UTC time
(draft-ietf-secsh-filexfer-13.txt chapter 7.7).

After looking in the code I found the difference that the when doing a 
numeric listin, the openssh client constructs the string shown while 
otherwise it is the server that builds up this string.

My question is, when the OpenSSH sftp client constructs that string, does it 
compensate for the timezone difference, i.e. does it show the UTC time sent 
by the server or does it convert it to client local time. Or is it 
undefined? Apprarently, it is wery confusing to get see different listing 
depending on the flags to ls.

Disclaimer, the server is a F-Secure implemenation. I haven't ruled out the 
possibility of  an error in the server implementation. It might the case 
that the server is sending timestamps in local time rather than UTC time.


Thanks in advance!

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the openssh-unix-dev mailing list