You are correct, maruthu:
trogdor ~ $ last -1x shutdown
shutdown system down 2.6.34.7-66.fc13 Sat Jan 8 20:20 - 20:29 (00:09)
wtmp begins Sun Aug 29 06:30:04 2010
Gives you the time of the last shutdown.
But:
trogdor ~ $ last -1x reboot
reboot system boot 2.6.34.7-66.fc13 Sat Jan 8 20:29 - 10:18 (7+13:49)
wtmp begins Sun Aug 29 06:30:04 2010
Shows the time of the last (re)boot, which corresponds to what is shown by uptime:
trogdor ~ $ uptime
10:18:41 up 7 days, 13:49, 6 users, load average: 0.03, 0.09, 0.08
You can use awk, sed, perl, and numerous other tools to extract and format the date and time of the last reboot to your liking. Please note that the year is not displayed.
You can parse /var/log/wtmp to get what you need. For instance, using the examples in Formatting and Printing Wtmp as a starting point:
#! /usr/bin/perl
use strict;
use warnings;
use POSIX qw{ strftime };
undef $/;
$\ = "\n";
$, = '';
my $reclen = 384; # sizeof (struct utmp)
my $linesize = 32; # value of UT_LINESIZE in /usr/include/bits/utmp.h
my $namesize = 32; # value of UT_NAMESIZE in /usr/include/bits/utmp.h
my $hostsize = 256; # value of UT_HOSTSIZE in /usr/include/bits/utmp.h
my $wtmpfile = '/var/log/wtmp';
my $entry_template = "(a$reclen)*";
my $utmp_template = "I x4 x$linesize x4 x$namesize x$hostsize x4 x4 I";
my @UT_TYPE = qw{ Empty RunLvl Boot NewTime OldTime Init Login Normal Term Account };
open FH, '<', $wtmpfile or die $wtmpfile;
my $boot = undef;
foreach my $entry (unpack $entry_template, <FH>) {
my ($type, $when) = unpack $utmp_template, $entry;
$boot = $when if $UT_TYPE[$type] eq 'Boot';
}
close FH;
print strftime '%Y-%m-%d %H:%M:%S %Z', localtime $boot if defined $boot;
will give you the time of the reboot:
trogdor ~ $ lastboot
2011-01-08 20:29:54 EST