summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/unix/time.c9
-rw-r--r--time/win32/time.c10
2 files changed, 4 insertions, 15 deletions
diff --git a/time/unix/time.c b/time/unix/time.c
index 1af56e643..507d71014 100644
--- a/time/unix/time.c
+++ b/time/unix/time.c
@@ -135,16 +135,11 @@ APR_DECLARE(apr_status_t) apr_time_exp_lt(apr_time_exp_t *result,
APR_DECLARE(apr_status_t) apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt)
{
- int year;
- time_t days;
+ apr_time_t year = xt->tm_year;
+ apr_time_t days;
static const int dayoffset[12] =
{306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
- year = xt->tm_year;
- if (year < 70 || ((sizeof(time_t) <= 4) && (year >= 138))) {
- return APR_EBADDATE;
- }
-
/* shift new year to 1st March in order to make leap year calc easy */
if (xt->tm_mon < 2)
diff --git a/time/win32/time.c b/time/win32/time.c
index 59ffcc43e..35743b3d2 100644
--- a/time/win32/time.c
+++ b/time/win32/time.c
@@ -218,17 +218,11 @@ APR_DECLARE(apr_status_t) apr_time_exp_lt(apr_time_exp_t *result,
APR_DECLARE(apr_status_t) apr_time_exp_get(apr_time_t *t,
apr_time_exp_t *xt)
{
- int year;
- time_t days;
+ apr_time_t year = xt->tm_year;
+ apr_time_t days;
static const int dayoffset[12] =
{306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
- year = xt->tm_year;
-
- if (year < 70 || ((sizeof(time_t) <= 4) && (year >= 138))) {
- return APR_EBADDATE;
- }
-
/* shift new year to 1st March in order to make leap year calc easy */
if (xt->tm_mon < 2)