http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11762
Revision: 11762 Author: drtrigon Date: 2013-07-16 18:34:07 +0000 (Tue, 16 Jul 2013) Log Message: ----------- bug fix; RuntimeError: API query error (follow-up to r11751 and r11754)
Modified Paths: -------------- trunk/pywikipedia/subster.py
Modified: trunk/pywikipedia/subster.py =================================================================== --- trunk/pywikipedia/subster.py 2013-07-14 21:33:02 UTC (rev 11761) +++ trunk/pywikipedia/subster.py 2013-07-16 18:34:07 UTC (rev 11762) @@ -599,12 +599,13 @@ {"snaktype": "value", "property": "p585", # point in time #"property": "p578", # Sandbox-TimeValue - u'value': {u'after': 0, - u'precision': 11, - u'time': (u'+0000000%sZ' % pywikibot.Timestamp.now().isoformat().split('.')[0]), - u'timezone': 0, + "datavalue": {u'type': u'time', + u'value': {u'after': 0, + u'precision': 11, + u'time': (u'+0000000%sZ' % pywikibot.Timestamp.now().isoformat().split('.')[0]), + u'timezone': 0, u'calendarmodel': u'http://www.wikidata.org/entity/Q1985727', - u'before': 0}},]}, + u'before': 0}}},]}, comment=summary) #print data['timestampFIDE'], pywikibot.Timestamp.now().isoformat()