Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: Getting the timestamp of a file

by broomduster (Priest)
on Jul 30, 2008 at 16:33 UTC ( [id://701181]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Getting the timestamp of a file
in thread Getting the timestamp of a file

In the hope of clearing some (potential) confusion here... I think becca23 is referring to Time::localtime (which is where ctime is defined), which is of course not the same as localtime. Nevertheless, using your one-liner, I get the same answer with both functions (which is a GoodThing).

$ ls -l xyz.txt -rw-rw-r-- 1 x x 0 Jul 30 12:22 xyz.txt $ perl -le 'use Time::localtime; print ctime((stat)[9]) for @ARGV' xyz +.txt Wed Jul 30 12:22:28 2008 $ perl -le 'print scalar localtime((stat)[9]) for @ARGV' xyz.txt Wed Jul 30 12:22:28 2008
...still suspecting a time zone issue, but puzzled/worried by the 47 minute discrepancy, to say nothing of the approx 5 month discrepancy that comes with it...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://701181]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found