Группа :: Разработка/Perl
Пакет: perl-Date-Manip
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: perl-Date-Manip-5.54-alt1.patch
Скачать
Скачать
.gear/rules | 2 +
.../tags/2f93c5b87ffa8dfdf85c3e6d1d9b2fac742049e5 | 13 +++
.../tags/9183654fd42c959668a9562e179047570c667b11 | 13 +++
.gear/tags/list | 2 +
lib/Date/Manip.pm | 32 +++++---
perl-Date-Manip.spec | 85 ++++++++++++++++++++
6 files changed, 137 insertions(+), 10 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..b744c2a
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: @version@:. name=Date-Manip-@version@
+diff: @version@:. . name=perl-Date-Manip-@version@-@release@.patch
diff --git a/.gear/tags/2f93c5b87ffa8dfdf85c3e6d1d9b2fac742049e5 b/.gear/tags/2f93c5b87ffa8dfdf85c3e6d1d9b2fac742049e5
new file mode 100644
index 0000000..7e392ee
--- /dev/null
+++ b/.gear/tags/2f93c5b87ffa8dfdf85c3e6d1d9b2fac742049e5
@@ -0,0 +1,13 @@
+object 3c2d4d8fa315b1c342c8d8bb563e6b79935837b6
+type commit
+tag 5.48
+tagger Alexey Tourbin <at@altlinux.ru> 1208994963 +0400
+
+5.48
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iEYEABECAAYFAkgPzJMACgkQfBKgtDjnu0bS/wCfd0lldaZ3caWG1oQyBrPXf7j6
+ff4AoNm27kucqkqe0a/U80pgPndFgNEt
+=U6gN
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/9183654fd42c959668a9562e179047570c667b11 b/.gear/tags/9183654fd42c959668a9562e179047570c667b11
new file mode 100644
index 0000000..e99fd84
--- /dev/null
+++ b/.gear/tags/9183654fd42c959668a9562e179047570c667b11
@@ -0,0 +1,13 @@
+object b58fdca11b1c3869a62da254c488ef1af0dd16bb
+type commit
+tag 5.54
+tagger Alexey Tourbin <at@altlinux.ru> 1218340600 +0400
+
+5.54
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iEYEABECAAYFAkieZvgACgkQfBKgtDjnu0abKQCgp040kpWhYCBTUf/unMyvmQob
+4pAAnRG7g58iGjewHzE00TfBEFwbyoMb
+=2Mi6
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..f45011b
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1,2 @@
+2f93c5b87ffa8dfdf85c3e6d1d9b2fac742049e5 5.48
+9183654fd42c959668a9562e179047570c667b11 5.54
diff --git a/lib/Date/Manip.pm b/lib/Date/Manip.pm
index 6a75aff..60b52ca 100644
--- a/lib/Date/Manip.pm
+++ b/lib/Date/Manip.pm
@@ -464,7 +464,7 @@ sub Date_Init {
[$Lang{$L}{"DoMH"},1]);
@tmp=();
- foreach $tmp (keys %{ $Lang{$L}{"DoMH"} }) {
+ foreach $tmp (sort keys %{ $Lang{$L}{"DoMH"} }) {
$tmp2=$Lang{$L}{"DoMH"}{$tmp};
if ($tmp2<6) {
$Lang{$L}{"WoMH"}{$tmp} = $tmp2;
@@ -566,6 +566,7 @@ sub Date_Init {
"cst -0600 ". # Central Standard
"cdt -0500 ". # Central Daylight
"est -0500 ". # Eastern Standard
+ "cot -0500 ". # America/Bogota (fix bug 3814)
"act -0500 ". # Brazil, Acre
"pet -0500 ". # Peruvian time
"vet -0430 ". # Venezuela
@@ -794,7 +795,7 @@ sub Date_Init {
$val=$Cnf{$key};
push(@tmp,"$key=$val");
}
- foreach $key (keys %Cnf) {
+ foreach $key (sort keys %Cnf) {
next if (exists $tmp{$key});
$val=$Cnf{$key};
push(@tmp,"$key=$val");
@@ -1104,7 +1105,7 @@ sub ParseDateString {
}
# Check for some special types of dates (next, prev)
- foreach $from (keys %{ $Lang{$L}{"Repl"} }) {
+ foreach $from (sort keys %{ $Lang{$L}{"Repl"} }) {
$to=$Lang{$L}{"Repl"}{$from};
s/(^|[^a-z])$from($|[^a-z])/$1$to$2/i;
}
@@ -1681,7 +1682,7 @@ sub ParseDateDelta {
}
$workweek=7 if ($Curr{"Mode"} != 2);
- foreach $from (keys %{ $Lang{$Cnf{"Language"}}{"Repl"} }) {
+ foreach $from (sort keys %{ $Lang{$Cnf{"Language"}}{"Repl"} }) {
$to=$Lang{$Cnf{"Language"}}{"Repl"}{$from};
s/(^|[^a-z])$from($|[^a-z])/$1$to$2/i;
}
@@ -3569,6 +3570,7 @@ sub Date_TimeZone {
$tz=$ENV{'SYS$TIMEZONE_DIFFERENTIAL'}/3600.; # e.g. '-4' for EDT
}
}
+ push(@tz,$tz) if (defined $tz);
} else {
$tz=`date +%Z 2> /dev/null`;
chomp($tz);
@@ -3577,8 +3579,13 @@ sub Date_TimeZone {
chomp($tz);
$tz=(split(/\s+/,$tz))[4];
}
+ push(@tz,$tz) if (defined $tz);
+
+ # for international timezones
+ $tz=`date +%z 2> /dev/null`;
+ chomp($tz);
+ push(@tz,$tz) if (defined $tz);
}
- push(@tz,$tz) if (defined $tz);
} else {
# We need to satisfy taint checking, but also look in all the
# directories in @DatePath.
@@ -3593,6 +3600,11 @@ sub Date_TimeZone {
$tz=(split(/\s+/,$tz))[4];
}
push(@tz,$tz) if (defined $tz);
+
+ # for international timezones
+ $tz=`date +%z 2> /dev/null`;
+ chomp($tz);
+ push(@tz,$tz) if (defined $tz);
}
}
@@ -3896,7 +3908,7 @@ sub _Date_InitHash {
# Create the regular expression
if ($regexp) {
- @list=keys(%$hash);
+ @list=sort keys(%$hash);
@list=sort _sortByLength(@list) if ($sort);
if ($escape) {
foreach $val (@list) {
@@ -3989,7 +4001,7 @@ sub _Date_InitLists {
# Create the regular expression
if ($regexp) {
- @list=keys(%hash);
+ @list=sort keys(%hash);
@list=sort _sortByLength(@list) if ($sort);
if ($escape) {
foreach $ele (@list) {
@@ -4175,7 +4187,7 @@ sub _Date_Regexp {
@list=split(/&&&/,$list);
if ($keys) {
%hash=@list;
- @list=keys %hash;
+ @list=sort keys %hash;
} elsif ($key0 or $key1 or $val0 or $val1) {
$i=0;
$i=1 if ($key1 or $val1);
@@ -5059,7 +5071,7 @@ sub _Date_UpdateHolidays {
my($date,$delta,$err)=();
my($key,@tmp,$tmp);
- foreach $key (keys %{ $Holiday{"desc"} }) {
+ foreach $key (sort keys %{ $Holiday{"desc"} }) {
@tmp=_Recur_Split($key);
if (@tmp) {
$tmp=ParseDateString("${year}010100:00:00");
@@ -5242,7 +5254,7 @@ sub _Events_Calc {
$tmp =~ s/^!//;
delete $tmp{$tmp};
}
- push(@ret,$date,[ keys %tmp ]);
+ push(@ret,$date,[ sort keys %tmp ]);
}
%tmp = @ret;
diff --git a/perl-Date-Manip.spec b/perl-Date-Manip.spec
new file mode 100644
index 0000000..0c95ceb
--- /dev/null
+++ b/perl-Date-Manip.spec
@@ -0,0 +1,85 @@
+%define dist Date-Manip
+Name: perl-Date-Manip
+Version: 5.54
+Release: alt1
+
+Summary: Date manipulation routines
+License: GPL or Artistic
+Group: Development/Perl
+
+URL: %CPAN %dist
+Source: %dist-%version.tar
+Patch: %name-%version-%release.patch
+
+Provides: perl-DateManip = %version
+Obsoletes: perl-DateManip < %version
+
+BuildArch: noarch
+
+# Automatically added by buildreq on Sun Aug 10 2008
+BuildRequires: perl-Module-Build perl-Test-Pod
+
+%description
+This is a set of Perl routines designed to make any common date/time
+manipulation easy to do. Operations such as comparing two times,
+calculating a time a given amount of time from another, or parsing
+international times are all easily done.
+
+%prep
+%setup -q -n %dist-%version
+%patch -p1
+
+%build
+%perl_vendor_build
+
+%install
+%perl_vendor_install
+
+%files
+%doc HISTORY README
+%dir %perl_vendor_privlib/Date
+ %perl_vendor_privlib/Date/Manip.pm
+%doc %perl_vendor_privlib/Date/Manip.pod
+
+%changelog
+* Sun Aug 10 2008 Alexey Tourbin <at@altlinux.ru> 5.54-alt1
+- 5.48 -> 5.54
+
+* Thu Apr 24 2008 Alexey Tourbin <at@altlinux.ru> 5.48-alt1
+- 5.44 -> 5.48
+- use `date +%%z' as possible source for timezone data (rh#248500)
+
+* Tue Feb 27 2007 Alexey Tourbin <at@altlinux.ru> 5.44-alt2
+- imported into git and adapted for gear
+- renamed package perl-DateManip -> perl-Date-Manip
+- applied rhbz214709.patch from Fedora
+
+* Sat Jun 04 2005 Alexey Tourbin <at@altlinux.ru> 5.44-alt1
+- 5.42a -> 5.44
+- applied Mandriva patches
+- manual pages not packaged (use perldoc)
+
+* Sat Feb 19 2005 ALT QA Team Robot <qa-robot@altlinux.org> 5.42a-alt1.1
+- Rebuilt with rpm-build-perl-0.5.1.
+
+* Tue Nov 11 2003 Alexey Tourbin <at@altlinux.ru> 5.42a-alt1
+- 5.42a
+- descriptions updated
+
+* Wed Mar 19 2003 Stanislav Ievlev <inger@altlinux.ru> 5.40-alt4.1
+- fix spec
+
+* Fri Nov 01 2002 Stanislav Ievlev <inger@altlinux.ru> 5.40-alt4
+- rebuild with new perl
+
+* Mon Jun 25 2001 Stanislav Ievlev <inger@altlinux.ru> 5.40-alt3
+- Rebuilt with perl-5.6.1
+
+* Fri Jun 13 2001 Grigory Milev <week@altlinux.ru> 5.40-alt2
+- Rewrite spec for compatible with new police
+
+* Fri Jun 08 2001 Grigory Milev <week@altlinux.ru> 5.40-alt1
+- new version (5.40)
+
+* Tue May 29 2001 AEN <aen@logic.ru> 5.39-alt1
+- first build for Sisyphus