From 8aa6ebc2dac1e562a0617ffb1155a2b24bb172a4 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Tue, 10 Aug 2004 11:12:18 +0000 Subject: [PATCH] Add Database*::timestamp(), using wfTimestamp() --- includes/Database.php | 5 +++++ includes/DatabasePostgreSQL.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/includes/Database.php b/includes/Database.php index 528c252531..6e78902e30 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -932,6 +932,11 @@ class Database { $this->query( 'COMMIT', $fname ); $this->mTrxLevel = 0; } + + # Return MW-style timestamp used for MySQL schema + function timestamp( $ts=0 ) { + return wfTimestamp(TS_MW,$ts); + } } class DatabaseMysql extends Database { diff --git a/includes/DatabasePostgreSQL.php b/includes/DatabasePostgreSQL.php index 6ada5ed04d..66c93d6b34 100644 --- a/includes/DatabasePostgreSQL.php +++ b/includes/DatabasePostgreSQL.php @@ -321,6 +321,11 @@ class DatabasePgsql extends Database { function wasDeadlock() { return false; } + + # Return DB-style timestamp used for MySQL schema + function timestamp( $ts=0 ) { + return wfTimestamp(TS_DB,$ts); + } } # Just an alias. -- 2.20.1