How to save time as UTC time in php/mysql?

kitaezik

New Member
I use\[code\]date_default_timezone_set($_SESSION['time_zone']); \[/code\]to set a users timezone on a page, I am wanting to know, how do I save current time to mysql in php with the current UTC date and time? Also should I be storing it as a timestamp?My existing site used datetime fields and when I saved a new item to mysql I could just use now() in the php part making the insert or update query
 
Back
Top