Skip to content
Advertisement

Tag: timezone

Using time zones in a PHP web application

I’ve been looking around for a few hours now about what’s the best way to use timezones in a PHP/MySQL web application, finding a definitive answer is hard. From what I’ve learnt so far it is best to store everyones stuff in the database in UTC (correct me if I am wrong). When a user registers I will ask them

PHP get UK local time from Server in different time zone

I have a web server which I do not know what the time zone is set to. it is now 10:49am in the UK, but when I run the following: The server returns the following time. Now I don’t want to just “Add” one hour onto the time because the time still needs to be correct when time moves forward

Advertisement