dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Call ssl_set() in DatabaseMysqli if DBO_SSL is set"
[lhc/web/wiklou.git]
/
includes
/
MWTimestamp.php
diff --git
a/includes/MWTimestamp.php
b/includes/MWTimestamp.php
index
4964fe6
..
defdc96
100644
(file)
--- a/
includes/MWTimestamp.php
+++ b/
includes/MWTimestamp.php
@@
-56,10
+56,14
@@
class MWTimestamp {
*
* @since 1.20
*
*
* @since 1.20
*
- * @param bool|string|int|float $timestamp Timestamp to set, or false for current time
+ * @param bool|string|int|float
|DateTime
$timestamp Timestamp to set, or false for current time
*/
public function __construct( $timestamp = false ) {
*/
public function __construct( $timestamp = false ) {
- $this->setTimestamp( $timestamp );
+ if ( $timestamp instanceof DateTime ) {
+ $this->timestamp = $timestamp;
+ } else {
+ $this->setTimestamp( $timestamp );
+ }
}
/**
}
/**