On Sat, Nov 29, 2008 at 22:36:05 +0100, Thomas Hartman wrote:
> Sometimes the following formulation works -- in a different repo, that
> is -- but for the repo shown below, it doesn't work. The only
> difference I see is that in the repo that does work the time zone is
> CEST instead of CET. (Just a shot in the dark.)

Hmm.  This is an issue that we may never get around to fixing.
The workaround is to use ISO 8601 dates and times, so

> [EMAIL PROTECTED]:~/tmp>darcs get --to-match='date "Fri Nov 28
> 10:26:41 CET 2008"' /home/thartman/patch-shack/

--to-match='date "2008-11-28 10:26:41+0100"'

Basically we use a hard-coded table of timezones (see the 'zone' function
in http://darcs.net/api-doc/src-IsoDate.html ) which is very incomplete.
For example, it knows about CEST but not CET.  There was a temptation to flesh
it out earlier, but we decided against it in this patch:

Mon Mar 17 17:13:48 GMT 2008  David Roundy <[EMAIL PROTECTED]>
  * remove two tests from match.pl that include matching of 3-letter timezone.
  These three-letter timezone abbreviations aren't unique, and I don't intend
  to add support for parsing them beyond what's already been added (which is
  just a few common abbreviations).

Note the objection that the three letter abbreviations are ambiguous (!). I
would be grateful if somebody could find an example.  You might also say that
it would desirable for darcs to be able to roundtrip parse the dates it emits.
But this will be unlikely because on Windows darcs unfortunately prints out
full time zone strings instead of 3 letter abbreviations (some crazy thing like
Romance Standard Time).

Now the good news is that we can relatively liberal about changing the time
zone parsing code because we have frozen a copy of this into the OldDate
module, which is what darcs uses for its internal patch manipulation stuff.
That means that we can change the code without being worried about breaking
something in darcs (the only backward compatibility issues being about keeping
the user interface familiar).  So if somebody were to develop a dedicatedd
date/time string parsing package or spin off the darcs code (I for one am happy
to BSD my contributions, but you'll have to chase down others), I would be
quite interested...

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to