From: Domas Mituzas Date: Tue, 10 Aug 2004 11:12:18 +0000 (+0000) Subject: Add Database*::timestamp(), using wfTimestamp() X-Git-Tag: 1.5.0alpha1~2442 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=8aa6ebc2dac1e562a0617ffb1155a2b24bb172a4;p=lhc%2Fweb%2Fwiklou.git Add Database*::timestamp(), using wfTimestamp() --- 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.