Exemplo n.º 1
0
function formatTimestampGMT($time, $format = 'l', $timeoffset = '')
{
    if ($timeoffset === '') {
        global $xoopsUser;
        if ($xoopsUser) {
            $timeoffset = $xoopsUser->getVar('timezone_offset', 'n');
        } else {
            $timeoffset = $GLOBALS['xoopsConfig']['default_TZ'];
        }
    }
    $usertimestamp = (int) $time + (int) $timeoffset * 3600;
    return _formatTimeStamp($usertimestamp, $format);
}
Exemplo n.º 2
0
function formatTimestampGMT($time, $format = "l", $timeoffset = "")
{
    global $xoopsConfig, $xoopsUser;
    if ($timeoffset == '') {
        if ($xoopsUser) {
            $timeoffset = $xoopsUser->getVar("timezone_offset");
        } else {
            $timeoffset = $xoopsConfig['default_TZ'];
        }
    }
    $usertimestamp = (int) $time + (int) $timeoffset * 3600;
    return _formatTimeStamp($usertimestamp, $format);
}