You are viewing a plain text version of this content. The canonical link for it is here.
Posted to client-dev@cassandra.apache.org by Brian Miles <se...@gmail.com> on 2015/05/12 05:33:27 UTC
timestamp and timeuuid strangeness
Hello,
I'm seeing strange things when storing both timestamp and timeuuid columns
from the C API using prepared statements. For example, I have some data
starting at 1/1/1981. The unix timestamp for this is 347173200, which I
can get out of my table as follows:
> select UNIXTIMESTAMPOF(date) from variables_by_date_patch limit 1;
UNIXTIMESTAMPOF(date)
-----------------------
347173200
However, when looking at the same data as a date:
> select DATEOF(date) from variables_by_date_patch limit 1;
DATEOF(date)
--------------------------
1970-01-04 19:26:13-0500
My table is defined as:
> describe table variables_by_date_patch;
CREATE TABLE variables_by_date_patch (
variable text,
date timeuuid,
patchid text,
value double,
PRIMARY KEY (variable, date, patchid)
) WITH CLUSTERING ORDER BY (date ASC, patchid ASC)
I'm using Cassandra 2.1.5 running on Debian 7. The data were written using
the latest version of the C API (
https://github.com/datastax/cpp-driver/commit/3310ab178d1188d5e85c03964247667be6db520c
).
Any hints would be greatly appreciated.
Thanks,
Brian
Re: timestamp and timeuuid strangeness
Posted by Alex Popescu <al...@datastax.com>.
On Mon, May 11, 2015 at 8:33 PM, Brian Miles <se...@gmail.com> wrote:
> I'm using Cassandra 2.1.5 running on Debian 7. The data were written using
> the latest version of the C API
>
Have you posted this question to the C/C++ driver mailing list?
https://groups.google.com/a/lists.datastax.com/forum/#!forum/cpp-driver-user
--
Bests,
Alex Popescu | @al3xandru
Sen. Product Manager @ DataStax