SysV Unix does not store the year in wtmp.
Most if not all Unix vendors have migrated to own extended wtmp files, named wtmpx or wtmps.
When adapting the last command, some vendors added new non-standard options.
Here is a portable script that makes some guesses and tries to compute the missing year:
last | PATH=/usr/xpg4/bin:/bin:/usr/bin awk '
BEGIN {
m["Jan"]=1
m["Feb"]=2
m["Mar"]=3
m["Apr"]=4
m["May"]=5
m["Jun"]=6
m["Jul"]=7
m["Aug"]=8
m["Sep"]=9
m["Oct"]=10
m["Nov"]=11
m["Dec"]=12
}
{
for (i=4;i<NF;i++) {
if (($(i-1) in m) && $i~/^[0-9]?[0-9]$/ && $(i+1)~/^[0-9]/) {
if ((m[$(i-1)]>pm || m[$(i-1)]==pm && $i>pday) && NR>1) year--
pm=m[$(i-1)]; pday=$i
$i=$i " " year
break
}
}
print
}' year=`date +%Y`