This is a discussion on GMT within the PHP General forums, part of the PHP Programming Forums category; Hi, My hosting provider is located somewhere in Houston, TX (EV1). I am using PHP and MySQL and need to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
My hosting provider is located somewhere in Houston, TX (EV1). I am using PHP and MySQL and need to store all dates/time in GMT (considering DST also). Appreciate any help! Once the date/time is in GMT, it would be easier for me to display the date base on user preference (time zone difference). Thanks. Hassan |
|
|||
|
As far as I know time() function returns the Unix timestamp which is GMT
measured; althought date() function does the GMT convertion to the local timezone. You can store the result of time and then, modify the TZ environment var to matchs user timezone. Manu. "Hassan Shaikh" <hassan@syberdesk.com> wrote in message news:000a01c3d84d$fe2d02f0$442658ca@MYBOX... Hi, My hosting provider is located somewhere in Houston, TX (EV1). I am using PHP and MySQL and need to store all dates/time in GMT (considering DST also). Appreciate any help! Once the date/time is in GMT, it would be easier for me to display the date base on user preference (time zone difference). Thanks. Hassan |
|
|||
|
Hello,
you can use gmdate() http://ch2.php.net/gmdate regards Sascha Hassan Shaikh wrote: > Hi, > > My hosting provider is located somewhere in Houston, TX (EV1). I am using PHP and MySQL and need to store all dates/time in GMT (considering DST also). Appreciate any help! > > Once the date/time is in GMT, it would be easier for me to display the date base on user preference (time zone difference). > > Thanks. > > > Hassan > |
![]() |
| Thread Tools | |
| Display Modes | |
|
|