summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2012-08-11 20:21:29 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2012-08-11 20:21:29 +0000
commit962137ff2fe12c4942f793698e91962ad93c1b94 (patch)
tree77d0181e2992230a03daa4dddbf982c2f0ebe911
parent01e1a467f762c994c047f4f26b098a46ea54b26e (diff)
downloadlibapr-962137ff2fe12c4942f793698e91962ad93c1b94.tar.gz
merge r1372018 from trunk:
fix print_time() to format the month properly, and adjust the tests to accommodate git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1372021 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/testtime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/testtime.c b/test/testtime.c
index 84b477269..654c1f95c 100644
--- a/test/testtime.c
+++ b/test/testtime.c
@@ -27,7 +27,7 @@
/* The time value is used throughout the tests, so just make this a global.
* Also, we need a single value that we can test for the positive tests, so
* I chose the number below, it corresponds to:
- * 2002-08-14 12:05:36.186711 -25200 [257 Sat].
+ * 2002-09-14 12:05:36.186711 -25200 [257 Sat].
* Which happens to be when I wrote the new tests.
*/
static apr_time_t now = APR_INT64_C(1032030336186711);
@@ -37,7 +37,7 @@ static char* print_time (apr_pool_t *pool, const apr_time_exp_t *xt)
return apr_psprintf (pool,
"%04d-%02d-%02d %02d:%02d:%02d.%06d %+05d [%d %s]%s",
xt->tm_year + 1900,
- xt->tm_mon,
+ xt->tm_mon + 1,
xt->tm_mday,
xt->tm_hour,
xt->tm_min,
@@ -78,7 +78,7 @@ static void test_gmtstr(abts_case *tc, void *data)
ABTS_NOT_IMPL(tc, "apr_time_exp_gmt");
}
ABTS_TRUE(tc, rv == APR_SUCCESS);
- ABTS_STR_EQUAL(tc, "2002-08-14 19:05:36.186711 +0000 [257 Sat]",
+ ABTS_STR_EQUAL(tc, "2002-09-14 19:05:36.186711 +0000 [257 Sat]",
print_time(p, &xt));
}