summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 494f243b..d0573ac8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2013-11-28 Kaz Kylheku <kaz@kylheku.com>
+ * lib.c (make_time): We must subtract from the 1-12
+ month for the tm_mon member of struct tm; we
+ were adding 1 instead.
+
+2013-11-28 Kaz Kylheku <kaz@kylheku.com>
+
* stream.c (tail_calc): New function
(tail_strategy): Handle the situation when the file disappears. We
cannot throw an error, but must poll the filesystem
diff --git a/lib.c b/lib.c
index ad5b4b94..4dfd83d7 100644
--- a/lib.c
+++ b/lib.c
@@ -5035,7 +5035,7 @@ val make_time(val year, val month, val day,
time_t time;
local.tm_year = c_num(year) - 1900;
- local.tm_mon = c_num(month) + 1;
+ local.tm_mon = c_num(month) - 1;
local.tm_mday = c_num(day);
local.tm_hour = c_num(hour);
local.tm_min = c_num(minute);