View Single Post
  #2 (permalink)  
Old 09-25-06, 05:15 PM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
to get the GMT date, you just have to use gmdate, this automaticly converts the local time to gmt.

to convert it back to singapore time, use the mktime() function: you enter the hours, minutes and seconds and it will create a new time. for you this could look like this:
PHP Code:

$gmt gmdate("H:i");

$singapore_time date("H:i"mktime(gmdate("H")+5gmdate("i")+30gmdate("s"), gmdate("m"), gmdate("d"), gmdate("Y"))); 
maybe there's a simpeler sollution, but this is one i just found, while looking on www.php.net,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote