(value)
return value
Given a VALUE, deserialize it to a datetime
Given a VALUE, deserialize it to a datetime
Given a VALUE deserialize it to a datetime
def deserialize_datetime(value):
    """
    Given a VALUE, deserialize it to a datetime
    """
    if isinstance(value, datetime.datetime):
        return value

    input_format = settings.DATETIME_INPUT_FORMATS[0]
    value = timezone.make_aware(datetime.datetime.strptime(
        value, input_format
    ), timezone.get_current_timezone())

    return value
def deserialize_datetime ( value ) : if isinstance ( value , datetime . datetime ) : return value input_format = settings . DATETIME_INPUT_FORMATS [ 0 ] value = timezone . make_aware ( datetime . datetime . strptime ( value , input_format ) , timezone . get_current_timezone ( ) ) return value