Skip to content

Commit

Permalink
Remove support for old version (per-8.4) of postgresql
Browse files Browse the repository at this point in the history
  • Loading branch information
yewtc committed Apr 18, 2023
1 parent 687f04c commit 46b4dfe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
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.

0 comments on commit 46b4dfe

Please sign in to comment.