From: Fabian Keil Date: Sat, 16 Jul 2016 11:43:26 +0000 (+0000) Subject: create-package-feed.pl: Generate valid (RFC-822) dates X-Git-Tag: v_3_0_26~55 X-Git-Url: http://www.privoxy.org/gitweb/-%22http:/sourceforge.net/static/git-favicon.png?a=commitdiff_plain;h=84e194c19963a0fbedc3579c92eaa49b7ab2cb95;p=privoxy.git create-package-feed.pl: Generate valid (RFC-822) dates --- diff --git a/utils/create-package-feed.pl b/utils/create-package-feed.pl index 6e875889..ede1ee76 100644 --- a/utils/create-package-feed.pl +++ b/utils/create-package-feed.pl @@ -88,10 +88,9 @@ while (my $fi1 = readdir($D1)) { $target_line .= ''; ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime($target_time); - $target_line .= - "$days[$wday], $mday $months[$mon] " - . ($year + 1900) - . " $hour:$min:$sec GMT"; + $target_line .= sprintf("%s, %s %s %d %.2d:%.2d:%.2d GMT", + $days[$wday], $mday, $months[$mon], ($year + 1900), + $hour, $min, $sec); $target_line .= ''; # Add it to Array