]> git.netwichtig.de Git - user/henk/code/snooze.git/blobdiff - snooze.c
find_next: take leap year into account (e.g. when using dayofyear)
[user/henk/code/snooze.git] / snooze.c
index 0c49e240b5dc14823a44beda72882b9660c0baa2..f37c42ac2a386453b9db812c59e97aa8d0dea0ed 100644 (file)
--- a/snooze.c
+++ b/snooze.c
@@ -1,16 +1,11 @@
 /*
  * snooze - run a command at a particular time
  *
- * To the extent possible under law,
- * Christian Neukirchen <chneukirchen@gmail.com>
+ * To the extent possible under law, Leah Neukirchen <leah@vuxu.org>
  * has waived all copyright and related or neighboring rights to this work.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-/*
-##% gcc -Os -Wall -g -o $STEM $FILE -Wextra -Wwrite-strings
-*/
-
 #include <sys/stat.h>
 #include <sys/types.h>
 
@@ -190,7 +185,7 @@ next_day:
                tm->tm_hour = 0;
 
                t = mktime(tm);
-               if (t > from+(365*24*60*60))  // no result within a year
+               if (t > from+(366*24*60*60))  // no result within a year
                        return -1;
        }