Print this page
4378 Clean up %C in *time() functions
438 need documentation for strftime %s flag

@@ -21,10 +21,12 @@
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
  * Copyright 2013 Joshua M. Clulow <josh@sysmgr.org>
+ *
+ * Copyright (c) 2014 Gary Mills
  */
 
 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
 /*        All Rights Reserved   */
 

@@ -547,11 +549,11 @@
                 if (next_event == NULL) {
                         ne_time = INFINITY;
                 } else {
                         ne_time = next_event->time - t;
 #ifdef DEBUG
-                        cftime(timebuf, "%C", &next_event->time);
+                        cftime(timebuf, "%+", &next_event->time);
                         (void) fprintf(stderr, "next_time=%ld %s\n",
                             next_event->time, timebuf);
 #endif
                 }
                 if (ne_time > 0) {

@@ -621,11 +623,11 @@
                         } else {
                                 next_event->time =
                                     next_time(next_event, (time_t)0);
                         }
 #ifdef DEBUG
-                        cftime(timebuf, "%C", &next_event->time);
+                        cftime(timebuf, "%+", &next_event->time);
                         (void) fprintf(stderr,
                             "pushing back cron event %s at %ld (%s)\n",
                             next_event->cmd, next_event->time, timebuf);
 #endif
 

@@ -1269,11 +1271,11 @@
                         reset_needed = 1;
                         break;
                 }
                 cte_valid();
 #ifdef DEBUG
-                cftime(timebuf, "%C", &e->time);
+                cftime(timebuf, "%+", &e->time);
                 (void) fprintf(stderr, "inserting cron event %s at %ld (%s)\n",
                     e->cmd, e->time, timebuf);
 #endif
         }
         cte_sendmail(u->name);  /* mail errors if any to user */