import pywikibot as bot

input="1987-12-12"

print(bot.WbTime(input))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-f0c9e0c69ff7> in <module>()
      3 input="1987-12-12"
      4 
----> 5 print(bot.WbTime(input))

/srv/paws/lib/python3.4/site-packages/pywikibot/__init__.py in __init__(self, year, month, day, hour, minute, second, precision, before, after, timezone, calendarmodel, site)
    484             self.precision = self.PRECISION['year']
    485             month = 1
--> 486         self.year = long(year)
    487         self.month = month
    488         self.day = day

ValueError: invalid literal for int() with base 10: '1987-12-12'