Jump to content

Timezone function - is this a good way around timezones?


zeroblitzt

Recommended Posts

function fixtime($oldtime)
{
$tz = $u['timezone'];
if ($tz || isset($tz))
{
$tz2 = ($tz * 60 * 60);
$newtime = $oldtime + $tz2;
return $newtime;
}
else
{
return $oldtime;
}
}

 

I have that function above, and my intent is to wrap that function around anything that comes out of the database of my website (messages, user sign up date, etc.). But I'm wondering if there is an easier way, or if this wont work.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.