����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
use strict;
use warnings;
use Test::More tests => 3;
use Date::Parse qw(strptime str2time);
# GH#12 / RT#84075: Date::Parse::str2time maps date in 1963 to 2063
# Root cause: str2time passed a 2-digit year to timegm, triggering its 50-year
# sliding window. The fix: strptime extracts the century and returns year as
# offset-from-1900; str2time reconstructs the full 4-digit year before calling
# timegm, bypassing the windowing entirely.
{
my $this_year = 1900 + (gmtime(time))[5];
my $target_year = $this_year - 50;
my $date = "$target_year-01-01 00:00:00 UTC";
my $time = str2time($date);
my $year_parsed_as = 1900 + (gmtime($time))[5];
is($year_parsed_as, $target_year, "GH#12: year $target_year not mapped to future");
# Canonical example from the original bug report (year 1963)
my $t1963 = str2time("1963-12-31 23:59:59 UTC");
my $got1963 = 1900 + (gmtime($t1963))[5];
is($got1963, 1963, "GH#12: 1963-12-31 not mapped to 2063");
# strptime must capture the century for 4-digit years
my @t = strptime("1963-12-31 23:59:59 UTC");
is($t[7], 19, "GH#12: strptime century field is 19 for 1963");
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| 00-report-prereqs.dd | File | 1.47 KB | 0644 |
|
| 00-report-prereqs.t | File | 5.88 KB | 0644 |
|
| cpanrt-format.t | File | 599 B | 0644 |
|
| cpanrt-language.t | File | 466 B | 0644 |
|
| cpanrt-overflow.t | File | 808 B | 0644 |
|
| cpanrt-parse.t | File | 5.07 KB | 0644 |
|
| cpanrt-zone.t | File | 4.03 KB | 0644 |
|
| date.t | File | 5 KB | 0644 |
|
| edge-cases.t | File | 8.93 KB | 0644 |
|
| format.t | File | 3.26 KB | 0644 |
|
| getdate.t | File | 7.62 KB | 0644 |
|
| gh10.t | File | 2.34 KB | 0644 |
|
| gh12.t | File | 1.13 KB | 0644 |
|
| lang-data.t | File | 10.29 KB | 0644 |
|
| lang-encoding.t | File | 1.19 KB | 0644 |
|
| lang.t | File | 479 B | 0644 |
|
| msk-tz.t | File | 594 B | 0644 |
|
| pod-valid.t | File | 436 B | 0644 |
|
| rt-format.t | File | 340 B | 0644 |
|
| rt-parse.t | File | 1.32 KB | 0644 |
|
| rt-timezone.t | File | 2.78 KB | 0644 |
|
| rt106105.t | File | 1.14 KB | 0644 |
|
| rt52387.t | File | 782 B | 0644 |
|
| rt57800.t | File | 1.29 KB | 0644 |
|
| str2time-epoch.t | File | 1.28 KB | 0644 |
|
| strptime-iso8601.t | File | 2.75 KB | 0644 |
|
| time2str-lang.t | File | 886 B | 0644 |
|
| tz-lang.t | File | 1.52 KB | 0644 |
|
| zone.t | File | 3.75 KB | 0644 |
|