]> git.saurik.com Git - apple/shell_cmds.git/blobdiff - lastcomm/lastcomm.c
shell_cmds-203.tar.gz
[apple/shell_cmds.git] / lastcomm / lastcomm.c
index e712874f71b5112fd54bb15fa61048b3bce942f7..e1d9b669556e0a276f2153dd474e25f34115f84b 100644 (file)
@@ -134,6 +134,7 @@ main(int argc, char *argv[])
                                        *p = '?';
                if (!*argv || requested(argv, &ab)) {
 
+                       time_t timelong = ab.ac_btime;
                        t = expand(ab.ac_utime) + expand(ab.ac_stime);
                        (void)printf(
                            "%-*.*s %-7s %-*.*s %-*.*s %6.2f secs %.16s",
@@ -143,7 +144,7 @@ main(int argc, char *argv[])
                             UT_NAMESIZE, UT_NAMESIZE,
                             user_from_uid(ab.ac_uid, 0), UT_LINESIZE,
                             UT_LINESIZE, getdev(ab.ac_tty),
-                            t / (double)AHZ, ctime(&ab.ac_btime));
+                            t / (double)AHZ, ctime(&timelong));
                        delta = expand(ab.ac_etime) / (double)AHZ;
                        printf(" (%1.0f:%02.0f:%05.2f)\n",
                               floor(delta / SECSPERHOUR),