create directories when extracting the diff. Closes: #374645
* Fix up and down keystrokes in the dselect help message. Closes: #383438
Thanks to Sven Joachim.
+ * Convert 822-date to be a simple wrapper around 'date -R'. 822-date is
+ now deprecated and should not be used anymore. It might be removed
+ sometime in the future. Closes: #31634, #367712, #314462
+ Thanks to Frank Lichtenheld.
[ Updated dpkg translations ]
* Romanian (Eddy Petrișor).
.\" Hey, Emacs! This is an -*- nroff -*- source file.
-.\" Authors: Ian Jackson
-.TH 822\-date 1 "2006-02-28" "Debian Project" "dpkg utilities"
+.TH 822\-date 1 "2007-01-24" "Debian Project" "dpkg utilities"
.SH NAME
-822\-date \- Print date and time in RFC822 format
+822\-date \- Print date and time in RFC2822 format
.
.SH SYNOPSIS
.B 822\-date
.
.SH DESCRIPTION
.B 822\-date
-displays the current date and time in the format described in RFC822,
-using a numeric timezone offset as recommended in RFC1123.
+displays the current date and time in the format described in RFC2822.
+It does so by simply calling
+.BR date (1)
+with the \fB\-R\fP option.
+.PP
+.B Using 822\-date is deprecated since
+.BR date (1)
+provides the same functionality when called with the \fB\-R\fP.
.
.SH OPTIONS
.B 822\-date
.BR date (1).
.
.SH SEE ALSO
-.I Standard for the Format of ARPA Internet Text Messages
-(RFC822),
-.br
-.I Requirements for Internet Hosts -- Application and Support
-(RFC1123) section 5.2.14,
-.br
+.I Internet Message Format
+(RFC2822),
.BR date (1).
.
.SH AUTHOR
.B 822\-date
-and this manpage were written by Ian Jackson. They are hereby placed
-by him into the public domain.
+is a really simple wrapper around
+.BR date (1).
+By its simplicity, the code is probably not copyrightable and
+should be considered to be in the public domain. This man page
+was written by Frank Lichtenheld based on an earlier version
+by Ian Jackson and was also put in the public domain.
#!/usr/bin/perl --
-# I hereby place this in the public domain - Ian Jackson, 1995.
-# Changes by Klee Dienes also placed in public domain (1997).
-# time structure:
-# [ sec min hour mday mon year wday yday isdst ]
+use strict;
+use warnings;
-@ARGV && die "usage: 822-date\n";
+my $dpkglibdir = "."; # This line modified by Makefile
+push(@INC, $dpkglibdir);
+require 'dpkg-gettext.pl';
+textdomain("dpkg-dev");
-$curtime = time;
-@localtm = localtime ($curtime);
-$localtms = localtime ($curtime);
-@gmttm = gmtime ($curtime);
-$gmttms = gmtime ($curtime);
+require 'controllib.pl';
-if ($localtm[0] != $gmttm[0]) {
- die (sprintf ("local timezone differs from GMT by a non-minute interval\n"
- . "local time: %s\n"
- . "GMT time: %s\n", $localtms, $gmttms));
-}
+@ARGV && die _g("Usage: 822-date")."\n";
-$localmin = $localtm[1] + $localtm[2] * 60;
-$gmtmin = $gmttm[1] + $gmttm[2] * 60;
+&warn(_g("This program is deprecated. Please use 'date -R' instead."));
-if ((($gmttm[6] + 1) % 7) == $localtm[6]) {
- $localmin += 1440;
-} elsif ((($gmttm[6] - 1) % 7) == $localtm[6]) {
- $localmin -= 1440;
-} elsif ($gmttm[6] == $localtm[6]) {
- 1;
-} else {
- die ("822-date: local time offset greater than or equal to 24 hours\n");
-}
+print `date -R`;
-$offset = $localmin - $gmtmin;
-$offhour = $offset / 60;
-$offmin = abs ($offset % 60);
-
-if (abs ($offhour) >= 24) {
- die ("822-date: local time offset greater than or equal to 24 hours\n");
-}
-
-printf
- (
- "%s, %2d %s %d %02d:%02d:%02d %s%02d%02d\n",
- (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$localtm[6]], # day of week
- $localtm[3], # day of month
- (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$localtm[4]], # month
- $localtm[5]+1900, # year
- $localtm[2], # hour
- $localtm[1], # minute
- $localtm[0], # sec
- ($offset >= 0) ? '+' : '-',# TZ offset direction
- abs ($offhour), # TZ offset hour
- $offmin, # TZ offset minute
- ) || die "822-date: output error: $!\n";