Sunday, March 5, 2017

Solved: MediaWiki sets all date to Thu, 01 Jan 1970 00:00:00 GMT

All dates (datetimes, timestamps) in your revisions in MediaWiki are shown as:
  • Thu, 01 Jan 1970 00:00:00 GMT
  • 00:33, 1 January 1970 
  • 31 December 1969
  • or something similar (depends on locale you use)
The issue is that a column in database is defined with shorter limit and date is truncated extremely. Updating your mediawiki will not solve the issue.

Solution: In your SQL db for your wiki look for the table called yourdbprefix_revision in that table find the column rev_timestamp and check its datatype, if it's set to anything less then VarChar(14) change it (to "VarChar(14)") and save the changes. Now when you edit a page the revision will show the correct date.

Special thanks to krikit.