⚠ 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

datetime stamp not in my timezone



Ron

Ron
  • profile picture
  • Member

Posted 26 March 2014 - 20:27 PM

When I post to MySQL the datetime is about 3 hrs behind. Where is my issue? I want the user to post in their timezone, too. 

 

Here is an example...

        $user_logs_update4 = array(
        "ID" => $primary_key,
        "LastUpdate" => date('Y-m-d H:i:s'));
        $this->db->update('table',$user_logs_update4,array('ID' => $primary_key));

Need some help on this one. I am a beginner in PHP. I would need detailed instructions.

 

 

 

 


Ron

Ron
  • profile picture
  • Member

Posted 31 March 2014 - 14:38 PM

Again, answered my own question (not exactly, but this will work). I will use Eastern time zone only.

 

date_default_timezone_set('America/New_York');