summaryrefslogtreecommitdiffstats
path: root/mdkapplet_gui.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-02-01 13:32:55 +0000
committerThierry Vignaud <tv@mandriva.org>2010-02-01 13:32:55 +0000
commitcb6007f020247f421dc6d8ca819ad38b032a2cdf (patch)
treedec92f5c164cef74c7a509fd87e10cf6d09c7b92 /mdkapplet_gui.pm
parent9a02314c43e8c4986f0d89a83bed1c3fb3f8f424 (diff)
downloadmgaonline-cb6007f020247f421dc6d8ca819ad38b032a2cdf.tar
mgaonline-cb6007f020247f421dc6d8ca819ad38b032a2cdf.tar.gz
mgaonline-cb6007f020247f421dc6d8ca819ad38b032a2cdf.tar.bz2
mgaonline-cb6007f020247f421dc6d8ca819ad38b032a2cdf.tar.xz
mgaonline-cb6007f020247f421dc6d8ca819ad38b032a2cdf.zip
(iso8601_date_to_locale) simplify so that we do not bring in too many
required packages
Diffstat (limited to 'mdkapplet_gui.pm')
-rw-r--r--mdkapplet_gui.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/mdkapplet_gui.pm b/mdkapplet_gui.pm
index cc416977..2a55b88b 100644
--- a/mdkapplet_gui.pm
+++ b/mdkapplet_gui.pm
@@ -25,7 +25,6 @@ package mdkapplet_gui;
use strict;
use lib qw(/usr/lib/libDrakX);
use common;
-use DateTime;
our @ISA = qw(Exporter);
our @EXPORT = qw(
@@ -127,10 +126,6 @@ sub setVar {
sub iso8601_date_to_locale {
my ($date) = @_;
return $date if $date !~ /(\d\d\d\d)-?(\d\d)-?(\d\d)/;
- my $dt = DateTime->new(year => $1, month => $2, day => $3);
- my $date1 = $dt->strftime("%x");
- # will fail on some locales (eg: br_FR, ...):
- eval { $dt->set_locale($ENV{LC_TIME}) };
- my $date2 = $dt->strftime("%x");
- $date2 || $date1;
+ strftime("%x", 0, 0, 0, $3, $2, $1-1900);
}
+