I've got into a problem that I can't seem to crack through my usual route of google,php manual,forum/book search. I'm storing a date in mysql datetime format. One of the many things that I need this datetime information for is as follows:
I need to be able to fetch the datetime field from the browser (the rows of data in this field are in 15 minute intervals) which are stored in GMT. I then need to be able to convert this date from mysql datetime to a timestamp, do some calculations (adding and subtracting from the timestamp generally), and then convert the timestamp back to a MySql GMT datetime string.
So the process is basically this:
Datetime(GMT) > Timestamp > Datetime(GMT).
You would think that this would be a fairly simple procedure, but I'm having terrible trouble finding a way of doing these conversions and keeping the time in GMT at all stages.
The server I'm using is set to BST ( british summer time) I've tried all of the relevant PHP date/time functions and can't seem to get any of them to keep the date/time in GMT during BST hours. There are knew functions in PHP 5 that help with this kind of calculation apparently, but this is of no use to me unfortunately, as I'm on a remote server running PHP version 4.3.10.
Any help on this would be much appreciated.
I need to be able to fetch the datetime field from the browser (the rows of data in this field are in 15 minute intervals) which are stored in GMT. I then need to be able to convert this date from mysql datetime to a timestamp, do some calculations (adding and subtracting from the timestamp generally), and then convert the timestamp back to a MySql GMT datetime string.
So the process is basically this:
Datetime(GMT) > Timestamp > Datetime(GMT).
You would think that this would be a fairly simple procedure, but I'm having terrible trouble finding a way of doing these conversions and keeping the time in GMT at all stages.
The server I'm using is set to BST ( british summer time) I've tried all of the relevant PHP date/time functions and can't seem to get any of them to keep the date/time in GMT during BST hours. There are knew functions in PHP 5 that help with this kind of calculation apparently, but this is of no use to me unfortunately, as I'm on a remote server running PHP version 4.3.10.
Any help on this would be much appreciated.