Handle times in the local timezone because Windows doesn't respect TZ.
commit8c8487910a5186e0c0871f450739933443c66a1f
authormhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Sat, 18 Jul 2009 20:49:57 +0000 (18 20:49 +0000)
committermhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Sat, 18 Jul 2009 20:49:57 +0000 (18 20:49 +0000)
treecefe3836872a3dda48128720653ca22257d65eb3
parentb6cc4d9ff486a011382260ae26b7b791656b4071
Handle times in the local timezone because Windows doesn't respect TZ.

Patch by: James Abbatiello <abbeyj@gmail.com>
(with comment revisions by me)

James's explanation:

The run-tests.py tries to set things up so that svn will output
timestamps in UTC instead of using the local timezone.  The comment
says "I have no idea if this works on Windows".  Well it doesn't work
on Windows unfortunately.  Timestamps keep getting output in the local
timezone.  There doesn't seem to be any way to override this behavior
on Windows.  The timestamp_chaos test ends up failing with all the
times off by a constant number of hours.  It doesn't seem too hard to
handle timestamps in the local timezone and in fact the comments
already make reference to doing this.  They don't seem to correctly
describe what is going on now with svn configured to output UTC times.
A small change to interpret the times that are hardcoded in
run-tests.py as UTC instead of local allows the test to run with svn
outputting local timestamps.  As a bonus this makes the existing
comments correct again.

* run-tests.py (timestamp_chaos): Use calendar.timegm() to convert
  times properly from UTC strings into seconds since the epoch.

  ("__main__"): Do not set the TZ environment variable, since it does
  not affect the Subversion client under Windows.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@4818 be7e6eca-30d4-0310-a8e5-ac0d63af7087
run-tests.py