Index: trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php |
— | — | @@ -133,7 +133,15 @@ |
134 | 134 | public static function todaysStart() { |
135 | 135 | static $time = false; |
136 | 136 | if ( !$time ) { |
137 | | - $time = wfTimestamp( TS_UNIX, substr( wfTimestamp( TS_MW ), 0, 8 ) . '000000' ); |
| 137 | + global $wgLocaltimezone; |
| 138 | + if ( isset( $wgLocaltimezone ) ) { |
| 139 | + $tz = new DateTimeZone( $wgLocaltimezone ); |
| 140 | + } else { |
| 141 | + $tz = new DateTimeZone( date_default_timezone_get() ); |
| 142 | + } |
| 143 | + $dt = new DateTime( 'now', $tz ); |
| 144 | + $dt->setTime( 0, 0, 0 ); |
| 145 | + $time = $dt->getTimestamp(); |
138 | 146 | } |
139 | 147 | return $time; |
140 | 148 | } |