⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

save current date



lanis
  • profile picture
  • Member

Posted 25 January 2014 - 02:17 AM

Hi!

 

I need to save current date and I supposed I must modify this code into application\libraries\grocery_crud.php

 

line # 253

 

case 'date':
/*if(!empty($value) && $value != '0000-00-00' && $value != '1970-01-01')
{
list($year,$month,$day) = explode("-",$value);


$value = date($this->php_date_format, mktime (0, 0, 0, (int)$month , (int)$day , (int)$year));
}
else 
{
$value = '';
}*/


$value = // some code with current date 
 
It's in that way? hope can help me, thanks in advance!

 


lanis
  • profile picture
  • Member

Posted 25 January 2014 - 20:58 PM

here is the solution: use current_time on is a timestamp instead "date".