You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2012/08/11 22:19:18 UTC

svn commit: r1372020 - in /apr/apr/branches/1.5.x: ./ test/testtime.c

Author: trawick
Date: Sat Aug 11 20:19:18 2012
New Revision: 1372020

URL: http://svn.apache.org/viewvc?rev=1372020&view=rev
Log:
merge r1372018 from trunk:

fix print_time() to format the month properly, and adjust the tests to
accommodate

Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/test/testtime.c

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1372018

Modified: apr/apr/branches/1.5.x/test/testtime.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/test/testtime.c?rev=1372020&r1=1372019&r2=1372020&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/test/testtime.c (original)
+++ apr/apr/branches/1.5.x/test/testtime.c Sat Aug 11 20:19:18 2012
@@ -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 *poo
     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, v
         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));
 }