'Get value from property to send to datastore.
We retrieve a datetime.time from the model instance and return a
datetime.datetime instance with the date set to 1/1/1970.
See base class method documentation for details.'

def get_value_for_datastore(self, model_instance):

    value = super(TimeProperty, self).get_value_for_datastore(model_instance)
    if (value is not None):
        assert isinstance(value, datetime.time), repr(value)
        value = _time_to_datetime(value)
    return value
