Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for old version (per-8.4) of postgresql #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions lib/DateTime/Format/Pg.pm
Original file line number Diff line number Diff line change
Expand Up @@ -340,26 +340,6 @@ sub _fix_timezone {
$args{'parsed'}->{'time_zone'} = $param{'_force_tz'};
}

elsif(!defined($args{'parsed'}->{'time_zone'})) {
# For very early and late dates, PostgreSQL always returns times in
# UTC and does not tell us that it did so.
#
if ( $args{'parsed'}->{'year'} < 1901
|| ( $args{'parsed'}->{'year'} == 1901 && ($args{'parsed'}->{'month'} < 12 || $args{'parsed'}->{'day'} < 14) )
|| $args{'parsed'}->{'year'} > 2038
|| ( $args{'parsed'}->{'year'} == 2038 && ($args{'parsed'}->{'month'} > 01 || $args{'parsed'}->{'day'} > 18) )
) {
$args{'parsed'}->{'time_zone'} = DateTime::TimeZone::UTC->new();
}

# DT->new() does not like undef time_zone params, which are generated
# by the regexps
#
else {
delete $args{'parsed'}->{'time_zone'};
}
}

# Numerical time zone
#

Expand Down
24 changes: 0 additions & 24 deletions t/tz_1901_2038.t

This file was deleted.