cass_uuid_gen_from_time() and cass_uuid_max_from_time() inputs are incosistence

60 views
Skip to first unread message

Kirill Khistyaev

unread,
Jul 10, 2015, 5:32:00 PM7/10/15
to cpp-dri...@lists.datastax.com
I was working with cass_uuid_gen_from_time() and cass_uuid_max_from_time() and I found it very confusing that the inputs to this functions are so inconsistent.

Input timestamp for cass_uuid_gen_from_time() actually have since since it is just unix timestamp in milliseconds.

But for cass_uuid_gen_from_time() I have to pass "(timestamp*10000L) + TIME_OFFSET_BETWEEN_UTC_AND_EPOCH" which is very strange.

If the format of the function can't be changed at least from_unix_timestamp() function should be exposed in cassandra.h.

Michael Penick

unread,
Jul 13, 2015, 11:17:21 AM7/13/15
to cpp-dri...@lists.datastax.com
That's a bug in those uuid min/max functions. Thanks for pointing out the issue.

Mike

To unsubscribe from this group and stop receiving emails from it, send an email to cpp-driver-us...@lists.datastax.com.

Kirill Khistyaev

unread,
Jul 13, 2015, 9:17:46 PM7/13/15
to cpp-dri...@lists.datastax.com
You are welcome. If you want I can submit a patch for it on github.

Kirill

Michael Penick

unread,
Jul 21, 2015, 2:54:37 PM7/21/15
to cpp-dri...@lists.datastax.com
Patches definitely welcome! I've created https://datastax-oss.atlassian.net/browse/CPP-283 to track the issue.

Thanks,
Mike

Kirill Khistyaev

unread,
Jul 22, 2015, 10:30:58 PM7/22/15
to cpp-dri...@lists.datastax.com
OK, I'll try to do it this week. You can assign it to me (kirhist).

Kirill

Kirill Khistyaev

unread,
Jul 27, 2015, 5:33:22 PM7/27/15
to DataStax C++ Driver for Apache Cassandra User Mailing List, michael...@datastax.com

Michael Penick

unread,
Jul 28, 2015, 2:36:37 PM7/28/15
to cpp-dri...@lists.datastax.com
Thanks. PR merged.
Reply all
Reply to author
Forward
0 new messages