Converting a user inputed time and date to GMT time

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

Converting a user inputed time and date to GMT time

Post by Mr Tech »

This is probably a simple answer. I searched but couldn't find what I was looking for...

If someone in the GMT + 10 time zone inputs a date (e.g: 2010-08-01 23:09:33) which I then convert to a TIMESTAMP (strtotime()), how do I convert that to GMT time?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Converting a user inputed time and date to GMT time

Post by requinix »

Use a GMT function like gmdate.
Post Reply