Previously, datetime objects were assumed to be in local time. Now, naive objects are expected to be in UTC and timezone-aware objects will be converted to UTC for storage.
Cassandra uses a signed byte array comparison to break ties when two UUIDs have matching timestamp components. The slice end templates we use to make the lowest or highest possible UUID with the same timestamp needed to be changed in order to match this.
Instead running through the logic of what type a piece of data each time that it's packed or unpacked, we can determine the correct basic function to use for packing and unpacked one time on initialization and just use that. This will be needed to make the packing and unpacking of CompositeTypes efficient, but has a side effect of being more efficient for normal types as well.
datetime.timetuple() only includes second precision, so it was necessary to extract the microseconds separately to keep them from being lost. This fixes an issue where TimeUUID columns that were inserted with datetimes were not ordered beyond second precision.
Previously, if a validator was added to a column in a CF with a comparator_type that was not BytesType or AsciiType, the column values were not likely to be packed correctly. This affected SystemManager.create_index() and SystemManager.alter_column(). (See issue #40.)
The convert_time_to_uuid() and convert_uuid_to_time() functions have been moved and added to util.py. Non slice arguments for TimeUUID column names and values will now also be converted. Additionally, timestamps are now accepted in addition to datetimes.