Jump to content

Translating my current timestamp to GMT time


marknt

Recommended Posts

Ok, I this is my code that Translates server time into client localized time based on client's chosen offset. And it works.
[code]
<?php
define('TIMENOW',time());
function translate_time($_offset,$_time = TIMENOW)
{
$_offset_secs = $_offset * 3600;
return $_offset_secs + $_time;
}

$model_timeoffset = -3;
$clients_time = $admin->translate_time($model_timeoffset,TIMENOW);
$servers_time = date("F d, Y l g:i A");
$gmt_time = ?
?>
[/code]

How can I convert the client's time to the current GMT time? Thanks

Cheers
[img]http://i91.photobucket.com/albums/k310/marknt/36_1_211.gif[/img]

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.