wrowe 2003/01/10 15:18:42
Modified: test testtime.c
Log:
One cannot just 'shift' the time by editing tm_gmtoff.
Revision Changes Path
1.48 +7 -3 apr/test/testtime.c
Index: testtime.c
===================================================================
RCS file: /home/cvs/apr/test/testtime.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- testtime.c 2 Jan 2003 17:51:49 -0000 1.47
+++ testtime.c 10 Jan 2003 23:18:42 -0000 1.48
@@ -129,10 +129,10 @@
if (rv == APR_ENOTIMPL) {
CuNotImpl(tc, "apr_time_exp_lt");
}
- /* Force us into PST timezone. This is the only way the test will
- * succeed.
+ /* XXX: This test is bogus, and a good example of why one never
+ * runs tests in their own timezone. Of course changing the delta
+ * has no impact on the resulting time, only the tm_gmtoff.
*/
- xt.tm_gmtoff = -25200;
CuAssertTrue(tc, rv == APR_SUCCESS);
CuAssertStrEquals(tc, "2002-08-14 12:05:36.186711 -25200 [257 Sat] DST",
print_time(p, &xt));
@@ -208,6 +208,10 @@
apr_status_t rv;
char str[STR_SIZE];
+ /* XXX: This test is bogus, and a good example of why one never
+ * runs tests in their own timezone. Of course changing the delta
+ * has no impact on the resulting time, only the tm_gmtoff.
+ */
rv = apr_ctime(str, now);
if (rv == APR_ENOTIMPL) {
CuNotImpl(tc, "apr_ctime");