i have several wordpress installations running on my servers. among them, there is one instance which is not publicly visible. it uses dates which are several decades in the past.
everything was working well when i last worked on that project, which is quite some time ago. but yesterday, when looking at it another time, i noticed something odd. the dates were all replaced with the current date (and time). wtf?
now, some debugging later, i found the culprit. that wordpress installation is in german (the only german one i have), and somewhere inside wordpress, a function called date_i18n
is used in that case to translate a timestamp into a date, time, or whatever is requested. unfortunately (for me), this function (in Wordpress/wp-includes/functions.php
) contains a “sanity check” for “php 5.1.0-”. in case the unix timestamp is negative, it is set to current time. and obviously, any date before january 1, 1970 will be turned into today.
commenting out these lines (or removing them) fixes the problem.
settings.
other languages.
pages.
friends.
things i like to read.
categories.
recent posts.
archives.
tags.
alberta calgary canada cats clouds concerts doom metal finland fisheye lens ga tours germany hiking hinwil macro photography math metal miukumauku movie music video series norway oldenburg panoramas photography photos programming progressive metal project 52 sky snow sun sunset switzerland telephoto lens traveling trees vacation videos www zoom zürich
places.
europe finland lapland ivalo france germany baden-württemberg lower saxony oldenburg north rhine-westphalia lüdinghausen saxony sächsische schweiz norway scandinavia lappland switzerland alps basel pratteln z-7 central switzerland glarus graubünden engadine ticino zürich zürcher oberland hinwil zürich üetliberg north america canada alberta calgary rocky mountains jasper newfoundland yukon oceans
comments.