Last modified: 2013-09-18 17:02:01 UTC
This may be a fairly ancient bug (2011 or earlier), but I could find no report for it, so here goes. The issue, which persists in SMW 1.8.0.5, is that dates stored using Type:Date are frequently displayed as "1 January 1970", followed by a time stamp, in semantic queries, including Factbox queries. A query for the unused date "1 January 1970" or "1970" returns no results, but one for the precise date and timestamp does return the relevant page. A query for the date that has been specified, even if this value does not show up in a query, returns the relevant page, too. Apparently the correct date has been stored somewhere, so the issue is not as alarming as it looks, but the value simply can't be retrieved through an #ask query. Specifications: SMW 1.8.0.5 MW 1.19.7 PHP 5.3.3-7+squeeze17 (cgi-fcgi) MySQL5.1.66-0+squeeze1
To add to the above. Unfortunately, this issue also has a serious side-effect: queries for date ranges using comparators won't give you the relevant pages. A lot of pages are not returned, some are and some that should not have been returned are listed regardless. The year "1970" is messing things up here.
Another thing. If the value is something like "650 AD" rather than "650", the year does get stored correctly, so at least there is a way around this bug. FYI, there was a SMW thread about this in 2012 (see "[Semediawiki-user] SMW 1.6.1 - all dates setting to January 1, 1970"). If you'll dig further into the archives, you'll find that the issue was also signalled by someone in 2011. Raising importance to "normal", if that's OK with you.
Just did a test on http://semantic-mediawiki.org and I'm seeing the same behaviour as I get on my own website.
*** Bug 47259 has been marked as a duplicate of this bug. ***
I'm not sure I understand as to why Bug 47259 has been marked as duplicate (assuming both reflect the same issue) since 47259 was reported 2013-04-15 and includes a patch note.
Ah, I didn't realise it would matter. I'll swap them round. *** This bug has been marked as a duplicate of bug 47259 ***