[Samba] Timestamp problem
mac at nibsc.ac.uk
Wed Oct 13 10:10:12 GMT 2004
>When new files or copied files are putted in a Samba share (3.0.2
>Solaris) from Win clients, it has no time stamp, only date stamp,
>-rwxr--r-- 1 me me 740762 Oct 11 2004 test.jpg
This looks like an 'ls' command.
Also, you have a slight misunderstanding of UNIX timestamps.
Every file has a full time stamp with time and date. However,
the 'ls' command shows the time stamp in one of two different ways:-
either 'Mon DD YYYY' or 'Mon DD HH:MM'
It chooses the second form if the file has been modified within
the last three months. It chooses the first form (with the year)
if the file's modification time is not within the last three months.
The important thing here is that when the time stamp on a file is _ahead_
of the current time, then the 'within the last three months' test fails.
I'll bet that you file has a timestamp that's further ahead in time than
the system clock of the server you ran the 'ls' command on.
Here's a rough timeline ('the past' on the left, 'the future' on the right)
3 2 1 o
The number represent months. The lower line is the period for which
'ls' will display the 'Mon DD HH:MM' format. I think the timestamp
on your file is to the right of 'Now'.
There's various things you can do to check this. If your OS has
a command 'stat' then that will show you all the timestamps in full detail.
Or you can use the 'stat' function in perl maybe, or the stat(2) system call.
Or, you can wait for a few hours, until the time on your server "catches up"
with the timestamp on the file and then 'ls' will display what you're
Remember all of this does not in any way affect the actual timestamp,
just the way 'ls' presents it to you.
The underlying problme is almost certainly one of time-syncing. Or TimeZone
differences. Have a look at all of them. And have a look at the timestamp
from a client machine too.
Assistant Systems Adminstrator @nibsc.ac.uk
dmccann at nibsc.ac.uk
Work: +44 1707 641565 Everything else: +44 7956 237670 (anytime)
More information about the samba