Link to home
Start Free TrialLog in
Avatar of tjyoung
tjyoung

asked on

Getting 'fractional' seconds in date time for some reason... need to lose the extra 2 digits

Using codeigniter (though I suppose doesn't really matter).
I pass a user_id to my model to get the correct time for their timezone prior to inserting into my db. When I echo out what is being created, I get the extra 2 digits for some inexplicable reason:

2014-04-14 10:40:3024
//passing the user id
	public function get_time($user_id)
	{
		return $this->db
			->select('timezone')
			->from('user')
			->where('id', $user_id)
			->get()->row();
	}

Open in new window

Any idea what is going on and how I could correct this?
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tjyoung
tjyoung

ASKER

Hi, your pointing out the 24 is what made my error click. I was echoing out the time and there wasn't an issue but... I was also returning the last inserted ID which happened to be 24. So it was being appended. Duh... kill me.
Thanks