Reputation: 11632
I would like to save timestamp value into column.
If i trying to do by this way:
$SessionData['valid_till'] = time() + WEEK;
I get right number value. But into column is already saved value like this:
0000-00-00 00:00:00
How can i do it right way in CakePHP?
Thanks for any advice.
Upvotes: 1
Views: 1187
Reputation: 3823
$SessionData['valid_till'] = date('Y-m-d H:i:s', strtotime("+1 week"));
Upvotes: 4