fix timezones in darcs-fast-export
commit6a9328014e78960cf55d3d468cea9892b7ade01c
authorD Herring <dherring@at.tentpost.dot.com>
Wed, 17 Mar 2010 00:14:48 +0000 (17 01:14 +0100)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 4 Jul 2016 16:54:59 +0000 (4 09:54 -0700)
treeb08a53145ad8afad1e68c8227c3b12242a2d0d88
parentd39f431a8801730812a526c5181350d07f5cdb47
fix timezones in darcs-fast-export

Previously, the export was mangling timezones.  There were conversion errors when the darcs TZ
did not match the conversion TZ.  Also, the conversion timezone was always reported (this is
bad since two conversions may now differ).

This patch fixes both problems on my system, but it has not been extensively tested.
Can 'local_date' be used reliably?  What about my TZ manipulations?
I am no expert in darcs or python.  Developed with darcs 2.3.1 and Python 2.6.4.

To check for errors, I compared a darcs repo against a "git darcs fetch" into a new repo.
The following two commands were helpful.
# darcs changes | grep for dates
# git log --pretty=format:%ad REF | cat

Example -- EDT=UTC-4 and EST=UTC-5; I am processing in EDT.
darcs date:
"Fri Mar 31 10:48:00 EST 2006"
Before patch, git reported:
"Fri Mar 31 12:48:00 2006 -0400" (should be 11:48 -0400 or 10:48 -0500)
After patch, git reported:
"Fri Mar 31 10:48:00 2006 -0500"
darcs-fast-export