Merge "Enable $wgVectorUseIconWatch by default."
[lhc/web/wiklou.git] / includes / Timestamp.php
index 630ac53..7dbfabf 100644 (file)
@@ -42,7 +42,6 @@ class MWTimestamp {
                TS_RFC2822 => 'D, d M Y H:i:s',
                TS_ORACLE => 'd-m-Y H:i:s.000000', // Was 'd-M-y h.i.s A' . ' +00:00' before r51500
                TS_POSTGRES => 'Y-m-d H:i:s',
-               TS_DB2 => 'Y-m-d H:i:s',
        );
 
        /**
@@ -73,7 +72,7 @@ class MWTimestamp {
         *
         * @since 1.20
         *
-        * @param $timestamp bool|string Timestamp to set, or false for current time
+        * @param bool|string $timestamp Timestamp to set, or false for current time
         */
        public function __construct( $timestamp = false ) {
                $this->setTimestamp( $timestamp );
@@ -87,7 +86,7 @@ class MWTimestamp {
         *
         * @since 1.20
         *
-        * @param $ts string|bool Timestamp to store, or false for now
+        * @param string|bool $ts Timestamp to store, or false for now
         * @throws TimestampException
         */
        public function setTimestamp( $ts = false ) {
@@ -118,8 +117,6 @@ class MWTimestamp {
                        # TS_POSTGRES
                } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/', $ts, $da ) ) {
                        # TS_POSTGRES
-               } elseif (preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.\d\d\d$/', $ts, $da ) ) {
-                       # TS_DB2
                } elseif ( preg_match( '/^[ \t\r\n]*([A-Z][a-z]{2},[ \t\r\n]*)?' . # Day of week
                                                                '\d\d?[ \t\r\n]*[A-Z][a-z]{2}[ \t\r\n]*\d{2}(?:\d{2})?' .  # dd Mon yyyy
                                                                '[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d/S', $ts ) ) { # hh:mm:ss
@@ -144,7 +141,7 @@ class MWTimestamp {
 
                try {
                        $final = new DateTime( $strtime, new DateTimeZone( 'GMT' ) );
-               } catch(Exception $e) {
+               } catch( Exception $e ) {
                        throw new TimestampException( __METHOD__ . ' Invalid timestamp format.' );
                }
 
@@ -162,7 +159,7 @@ class MWTimestamp {
         *
         * @since 1.20
         *
-        * @param $style int Constant Output format for timestamp
+        * @param int $style Constant Output format for timestamp
         * @throws TimestampException
         * @return string The formatted timestamp
         */