Timestamp issue

24 views
Skip to first unread message

Boris

unread,
Nov 21, 2014, 8:36:35 AM11/21/14
to php-cassan...@googlegroups.com
Hi, 

I have small issue with timestamps; this is what I do on insert : 

$where = [
  'account_username' => $this->getAccountName(),
  'date_prepared' => $date_prepared,
  'date_staged' => $this->date->getTimestamp(),
];

This is what I can then see via terminal : 


However on `SELECT statement`  the result is different : 

I use the same server to perform INSERT and SELECT statements. Any idea what I could be doing wrong ?

Thanks, 
Boris



Paweł Głasek

unread,
Dec 4, 2014, 2:48:52 AM12/4/14
to php-cassan...@googlegroups.com
Hi,

I've got the same exact problem as you do. Any update on this?

Boris

unread,
Dec 4, 2014, 4:00:11 AM12/4/14
to php-cassan...@googlegroups.com
Hi Pawel, 

Unfortunately I couldn't figure out what's wrong with my code or db schema; I've also noticed the guys are working on an updated timestamp version. 

So as a solution to my problem, I've changed the field type from `timestamp` to `integer`. In this was I handle all dates and so far had no problems. 

Regards,
Boris


On Thursday, December 4, 2014 7:48:52 AM UTC, Paweł Głasek wrote:
Hi,

I've got the same exact problem as you do. Any update on this?

On Friday, November 21, 2014 2:36:35 PM UTC+1, Boris wrote:
Hi, 

I have small issue with timestamps; this is what I do on insert : 

$where = [
  'account_username' => $this->getAccountName(),
  'date_prepared' => $date_prepared,
  'date_staged' => $this->date->getTimestamp(),
];

This is what I can then see via terminal : 



However on `SELECT statement`  the result is different : 


Paweł Głasek

unread,
Dec 4, 2014, 5:43:14 AM12/4/14
to php-cassan...@googlegroups.com
Unfortunatelly I can use int as my date is used to perfom range queries. Will try to fix the issue with the library though :) Thanks for reply!
Reply all
Reply to author
Forward
0 new messages