[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-devel] more specfile blues
From: |
Philip S Tellis |
Subject: |
[Ayttm-devel] more specfile blues |
Date: |
Mon, 20 Jan 2003 12:15:04 +0530 (IST) |
ok, just found out that the spec file wants our ChangeLog in
chronological order... and it doesn't recognise timezones. So
basically, GMT+1 and IST needs to be converted to GMT.
I wrote a short perl script to do that. Spread out here for
readability.
I'll run this on the HEAD changelog and commit it later. Right now I'm
releasing the rpm for 0.2.1-1.1
Philip
#!/usr/bin/perl -wp
use Time::Local;
# Change GMT+1
s/(\d+):(\d+) GMT\+1/sprintf "%02d:$2 GMT",$1-1/e;
# Change IST
s/(\d+):(\d+) IST/
my ($h,$m)=($1-5,$2-30);
if($m<0) {
$m+=60;$h--
}
sprintf "%02d:%02d GMT", $h, $m;
/ex;
# Change negative dates
s/... Jan (\d+) 2003 (-\d)/
($dn, $h)=($1-1, $2+24);
$d = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')[
(localtime(
timelocal(0,0,0,$dn,0,103)
))[6]
];
sprintf "$d Jan $dn 2003 $h"
/ex;
__END__
--
If imprinted foil seal under cap is broken or missing when purchased, do not
use.
- [Ayttm-devel] more specfile blues,
Philip S Tellis <=