Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Date and time for log files

by roboticus (Chancellor)
on Oct 04, 2007 at 15:48 UTC ( #642688=note: print w/replies, xml ) Need Help??


in reply to Date and time for log files

ibaboom:

Howzabout:

#!/usr/bin/perl -w use strict; use warnings; my @gm = localtime(time); printf "%04u%02u%02u%02u%02u\n", $gm[5]+1900, $gm[4]+1, $gm[3], $gm[2], $gm[1], $gm[0];

...roboticus

Replies are listed 'Best First'.
Re^2: Date and time for log files
by ibaboom (Initiate) on Oct 04, 2007 at 16:28 UTC
    /me = dork
      No you're not. If you hadn't asked the question I wouldn't have seen roboticus's nifty little snippet which is now filed away in my snippet toolbox. So, thanks for asking the question :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2021-12-09 14:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (36 votes). Check out past polls.

    Notices?