r42180 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42179‎ | r42180 | r42181 >
Date:22:24, 17 October 2008
Author:brion
Status:old
Tags:
Comment:
Quick tweak -- use gmdate() instead of date() here. We're using UTC time on Wikitech log, but the server's time is set to EST/EDT so date() times don't match
Modified paths:
  • /trunk/extensions/LogEntry/LogEntry.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LogEntry/LogEntry.body.php
@@ -82,7 +82,7 @@
8383 $article = new Article( $title );
8484
8585 # Build new line
86 - $newLine = sprintf( "* %s %s: %s", date( 'H:i' ), $wgUser->getName(),
 86+ $newLine = sprintf( "* %s %s: %s", gmdate( 'H:i' ), $wgUser->getName(),
8787 trim( htmlspecialchars( $wgRequest->getText( 'line' ) ) ) );
8888
8989 # Get content without logentry tag in it
@@ -92,7 +92,7 @@
9393 $contentLines = explode( "\n", $content );
9494
9595 # Build heading
96 - $heading = sprintf( '== %s ==', date( 'F j' ) );
 96+ $heading = sprintf( '== %s ==', gmdate( 'F j' ) );
9797
9898 # Find line of first section
9999 $sectionLine = false;

Status & tagging log