This is bugging me.....
I am trying to convert the time & date from a server that is in the US to my clients requirements in New Zealand (we are 12 hours in front)......but it ain't working too good.
Is there a way to change the timezone globally without having to fool around with lots of little functions that take 12 hours from the current hour....and then if it's pm make it am, etc.
heres the very longwinded script I've been using...unsuccessfully.......
//set the date and time vars
$month = date("\/m\/y");
$day = date("d");
$am_pm = gmdate(a);
$hour = gmdate(h);
$mins = gmdate(i);
$hour = ereg_replace("0","",$hour);
if($am_pm == "am")
{
$am_pm = "pm";
}
if($am_pm == "am")
{
$am_pm = "pm";
}
$nzday = ($day+1);
$Post_date = "$nzday$month";
$Post_time = "$hour:$mins $am_pm";
rgds,
scott d~