dict = {'_id': {'user': 'ariel', 'day': 1332115200000.0}, 'value': {
    'count': 99.0}}
datetime.datetime.utcfromtimestamp(dict['_id']['day'] / 1000.0)
Putting a Date object into MongoDB, getting back a float when querying with pymongo