Permalink
Browse files

Handle darcs date strings with multi-word time zone names

Example: "Sun Sep 21 07:22:44 Pacific Daylight Time 2003", seen in the
darcs.net repo itself.

Fixes #23
  • Loading branch information...
1 parent e5fee32 commit 16c751fc70a2bab76cf636bced75fc8d9b942a1b @purcell committed Apr 15, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 darcs-to-git
View
@@ -414,7 +414,7 @@ class DarcsPatch
# difference between local time and UTC time.
# example: Mon Oct 2 14:23:28 CEST 2006
- pat = /^\w\w\w (\w\w\w) ([ 1-9]\d) ([ 0-9]\d)\:(\d\d)\:(\d\d) \w* (\d\d\d\d)/
+ pat = /^\w\w\w (\w\w\w) ([ 1-9]\d) ([ 0-9]\d)\:(\d\d)\:(\d\d) [\w ]*? (\d\d\d\d)/
# UTC time may be in the format 20121131154505, or in the regular pattern above
utc_time = if utc =~ /^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/
Time.utc($1,$2,$3,$4,$5,$6)

0 comments on commit 16c751f

Please sign in to comment.