Subject: bin/5311: last doesn't tell you which year logs start
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mason@primenet.com.au>
List: netbsd-bugs
Date: 04/18/1998 07:31:55
>Number:         5311
>Category:       bin
>Synopsis:       last doesn't tell you which year logs start
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 18 00:35:00 1998
>Last-Modified:
>Originator:     Geoff C. Wing
>Organization:
Geoff Wing   <gcw@pobox.com>            Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/
>Release:        -current and before
>Environment:
System: NetBSD coral.primenet.com.au 1.3E NetBSD 1.3E (CORAL) #5: Wed Apr 1 16:46:04 EST 1998 mason@coral.primenet.com.au:/home/src/netbsd/src/sys/arch/i386/compile/CORAL i386


>Description:
	% last 
        ....
	wtmp begins Tue Feb 11 11:12

	But which year?

>How-To-Repeat:
	Obvious
>Fix:
        This is a bit yucky relying on ctime().  I think strftime() would be
	better but since it's being done with ctime() I've left it that way.
	
*** /usr/src/usr.bin/last/last.c	Wed Aug 27 21:43:40 1997
--- /usr/obj/usr.bin/last/last.c	Sat Apr 18 17:23:51 1998
***************
*** 287,293 ****
  		}
  	}
  	ct = ctime(&buf[0].ut_time);
! 	printf("\nwtmp begins %10.10s %*.*s \n", ct, timesize, timesize, ct + 11);
  }
  
  /*
--- 287,293 ----
  		}
  	}
  	ct = ctime(&buf[0].ut_time);
! 	printf("\nwtmp begins %10.10s %*.*s %4.4s\n", ct, timesize, timesize, ct + 11, ct + 20);
  }
  
  /*
>Audit-Trail:
>Unformatted: