From 0d6af140b8bd085017e67f535e0561da85b17b91 Mon Sep 17 00:00:00 2001 From: Thad Ward Date: Wed, 16 Jun 2004 07:36:57 +0000 Subject: [PATCH] correct the date format to match the new format used by the new CVS. the offset from GMT is also parsed out, but is not currently used. Also, there is no need to subtract 1900 from the year when passing to timegm(), as it assumes values over 999 are the actual year. --- TODO | 1 + tools/cvs2cl/cvs2cl.pl | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index bff1cabc0..11b28d415 100644 --- a/TODO +++ b/TODO @@ -6,6 +6,7 @@ I = in progress W = waiting on other work + X fix skybox/dome vis problems (workable solution found, needs new renderer) X It's possible to stick on some obtuse-angled corners qwsv 2.3x didn't X ~/.quakeforgerc should support all commands, not just set and setrom diff --git a/tools/cvs2cl/cvs2cl.pl b/tools/cvs2cl/cvs2cl.pl index 58ec6ebc9..b37e85f4a 100755 --- a/tools/cvs2cl/cvs2cl.pl +++ b/tools/cvs2cl/cvs2cl.pl @@ -891,15 +891,18 @@ sub parse_date_and_author () # Parses the date/time and author out of a line like: # # date: 1999/02/19 23:29:05; author: apharris; state: Exp; + # + # new line format: + # date: 2001-01-09 05:58:40 +0000; author: taniwha; state: Exp; my $line = shift; - my ($year, $mon, $mday, $hours, $min, $secs, $author) = $line =~ - m#(\d+)/(\d+)/(\d+)\s+(\d+):(\d+):(\d+);\s+author:\s+([^;]+);# + my ($year, $mon, $mday, $hours, $min, $secs, $offset, $author) = $line =~ + m#(\d+)-(\d+)-(\d+)\s+(\d+):(\d+):(\d+)\s+([+-]\d+);\s+author:\s+([^;]+);# or die "Couldn't parse date ``$line''"; die "Bad date or Y2K issues" unless ($year > 1969 and $year < 2258); # Kinda arbitrary, but useful as a sanity check - my $time = timegm($secs,$min,$hours,$mday,$mon-1,$year-1900); + my $time = timegm($secs,$min,$hours,$mday,$mon-1,$year); return ($time, $author); }