diff options
author | Eric Wong <e@80x24.org> | 2016-12-13 03:10:12 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-12-13 03:46:35 +0000 |
commit | a629927ec2ac4f41022ab1d2b1897cbc0e463e3e (patch) | |
tree | 40b0c05248d185de567c22f59e13ea364dcbe62b /lib/PublicInbox/NNTP.pm | |
parent | ed15c484cdc3daec5abe224a349c083ec3b2db53 (diff) | |
download | public-inbox-a629927ec2ac4f41022ab1d2b1897cbc0e463e3e.tar.gz |
There's no need to use strftime if we'll be converting the date by hand, anyways.
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r-- | lib/PublicInbox/NNTP.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index b7143ff3..9408ffb9 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -250,8 +250,8 @@ sub parse_time ($$;$) { ($YYYY, $MM, $DD) = unpack('A4A2A2', $date); } else { # legacy clients send YYMMDD ($YYYY, $MM, $DD) = unpack('A2A2A2', $date); - if ($YYYY > strftime('%y', @now)) { - my $cur_year = $now[5] + 1900; + my $cur_year = $now[5] + 1900; + if ($YYYY > $cur_year) { $YYYY += int($cur_year / 1000) * 1000 - 100; } } |