From 436bbe87a825aedc73bdea0f4e9c40e4268b0774 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Thu, 25 Jan 2018 20:02:13 +0000 Subject: [PATCH] change DATEFUTURE to 2038-01-18 ... - see #126 --- upgrade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upgrade.php b/upgrade.php index b01229f8..161db2fd 100644 --- a/upgrade.php +++ b/upgrade.php @@ -250,7 +250,7 @@ function db_query_parsed($sql, $ignore_errors = 0, $attach_mysql = "") { '{BIGINT}' => 'bigint NOT NULL DEFAULT 0', '{DATETIME}' => "datetime NOT NULL default '2000-01-01 00:00:00'", # different from {DATE} only for MySQL '{DATE}' => "timestamp NOT NULL default '2000-01-01'", # MySQL needs a sane default (no default is interpreted as CURRENT_TIMESTAMP, which is ... - '{DATEFUTURE}' => "timestamp NOT NULL default '2038-01-19'", # different default timestamp for vacation.activeuntil + '{DATEFUTURE}' => "timestamp NOT NULL default '2038-01-18'", # different default timestamp for vacation.activeuntil '{DATECURRENT}' => 'timestamp NOT NULL default CURRENT_TIMESTAMP', # only allowed once per table in MySQL ); $sql = "$sql $attach_mysql"; @@ -273,7 +273,7 @@ function db_query_parsed($sql, $ignore_errors = 0, $attach_mysql = "") { '{BIGINT}' => 'bigint(20) NOT NULL DEFAULT 0', '{DATETIME}' => "datetime NOT NULL default '2000-01-01'", '{DATE}' => "datetime NOT NULL default '2000-01-01'", - '{DATEFUTURE}' => "datetime NOT NULL default '2038-01-19'", # different default timestamp for vacation.activeuntil + '{DATEFUTURE}' => "datetime NOT NULL default '2038-01-18'", # different default timestamp for vacation.activeuntil '{DATECURRENT}' => 'datetime NOT NULL default CURRENT_TIMESTAMP', ); } elseif($CONF['database_type'] == 'pgsql') { @@ -297,7 +297,7 @@ function db_query_parsed($sql, $ignore_errors = 0, $attach_mysql = "") { 'int(4)' => 'int', '{DATETIME}' => "timestamp with time zone default '2000-01-01'", # stay in sync with MySQL '{DATE}' => "timestamp with time zone default '2000-01-01'", # stay in sync with MySQL - '{DATEFUTURE}' => "timestamp with time zone default '2038-01-19'", # stay in sync with MySQL + '{DATEFUTURE}' => "timestamp with time zone default '2038-01-18'", # stay in sync with MySQL '{DATECURRENT}' => 'timestamp with time zone default now()', );