Time on Server
I've got a page that stores an entry into a mysql database. One of the fields will contain the time the item is posted and I get this by using the php $now = time("now"). This provides the time on the server but I assume it is on GMT as it it about one hour behind. That is, if I process the page at 17:41 it will store the time equivalent of 16:41.
I've got two questions.
First of all does the server always stick to GMT throughout the year? I've recently been moved to islander from cambridge and I'm sure that cambridge's server time moved from GMT to BST whenever it was the clocks changed.
Secondly, what can I do to time("now") to make sure I always capture the current time? I know I can add 3600 (an extra hour) to the GMT to get BST but then I'll have a similar problem when the clocks go back again.
Thanks.
|