summaryrefslogtreecommitdiffstats
path: root/cdf_time.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2012-04-13 23:30:38 +0000
committerobrien <obrien@FreeBSD.org>2012-04-13 23:30:38 +0000
commit15f98df7891f1853090ecb6c4a9cc734e671ef6b (patch)
tree76d27a13085cbcecae404c91dc1a6e03fc5c5d7b /cdf_time.c
parent75c49f9dd6a0ff710f7c791a485899c7a07af444 (diff)
downloadFreeBSD-src-15f98df7891f1853090ecb6c4a9cc734e671ef6b.zip
FreeBSD-src-15f98df7891f1853090ecb6c4a9cc734e671ef6b.tar.gz
Virgin import of Christos Zoulas's FILE 5.11.
Diffstat (limited to 'cdf_time.c')
-rw-r--r--cdf_time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cdf_time.c b/cdf_time.c
index ee04fb6..5061b46 100644
--- a/cdf_time.c
+++ b/cdf_time.c
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf_time.c,v 1.10 2011/02/10 17:03:16 christos Exp $")
+FILE_RCSID("@(#)$File: cdf_time.c,v 1.11 2011/12/13 13:48:41 christos Exp $")
#endif
#include <time.h>
@@ -121,7 +121,7 @@ cdf_timestamp_to_timespec(struct timespec *ts, cdf_timestamp_t t)
tm.tm_year = (int)(CDF_BASE_YEAR + (t / 365));
rdays = cdf_getdays(tm.tm_year);
- t -= rdays;
+ t -= rdays - 1;
tm.tm_mday = cdf_getday(tm.tm_year, (int)t);
tm.tm_mon = cdf_getmonth(tm.tm_year, (int)t);
tm.tm_wday = 0;
OpenPOWER on IntegriCloud