[Mediawiki-l] Time stamp variance??SOLVED as far as Mediawiki is concerned.

Daniel Friesen lists at nadir-seen-fire.com
Tue Jan 10 02:37:54 UTC 2012


On Mon, 09 Jan 2012 17:56:03 -0800, John W. Foster  
<jfoster81747 at verizon.net> wrote:

> On Sat, 2012-01-07 at 05:55 -0800, Daniel Friesen wrote:
>> On Sat, 07 Jan 2012 05:45:27 -0800, John W. Foster
>> <jfoster81747 at gmail.com> wrote:
>>
>> > I was running the php runjobs.php to refresh the links as Ive been
>> > editing heavily. I noticed that as it completed each check it time
>> > stamped the entry in the terminal screen. It was 7:40:13 A.M. actual
>> > time but the time stamp read 13:40:13  Anyone know what is causing  
>> this.
>> > I don't think it causes an issue but just seems strange.
>> > Thanks!
>> > frosty
>>
>> Ever heard of time zones and UTC?
>> https://en.wikipedia.org/wiki/UTC
>>
>
> Though I doubt your reply was expected to yield any positive result...It
> was indeed exactly what I needed to find the issue. It seems there is a
> call from within the script to my MySQL database for a time stamp the
> matches that of the DB. It interprets that answer into a format that is
> supposed to work withing Mediawiki.
>
>> private function runJobsLog( $msg ) {
>> 		$this->output( wfTimestamp( TS_DB ) . " $msg\n" );
>> 		wfDebugLog( 'runJobs', $msg );
>> 	}
>
> Now that I've identified the problem & am certain that there is no real
> issue. And especially since I'm not very adept at programming...Can
> someone tell me what to do to correct this? I did look at the functions
> listed in Manual:WfTimestamp for the explanation and determined that I
> need to correct this in MySQL. An examination of the DB system settings
> indicate this is likely an issue to be resolved with assistance from my
> MySQL friends, so I'll ask there as well. Thanks for the tip!
> frosty
*facepalm*
Timestamps outputted by runJobs are in the UTC timezone NOT your local  
timezone so of course it's not going to match local time. There is NO bug.

And wfTimestamp( TS_DB ) DOES NOT query the MySQL database for a time, it  
returns the current time in a format that we can insert into a database.

-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]



More information about the MediaWiki-l mailing list