The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Get date and time for past 1 hour from current date
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Get date and time for past 1 hour from current date
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
12-21-2007
Perderabo
Unix Daemon
Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,128
One way:
$
perl
-e '@d=localtime time()-3600; printf "%4d%02d%02d%02d%02d%02d\n", $d[5]+1900,$d[4]+1,$d[3],$d[2],$d[1],$d[0]'
20071220220154
Perderabo
View Public Profile
Find all posts by Perderabo
Find Perderabo's past nominations received
Find Perderabo's present nominations given