2003/11/13 18:21
kjs222
Friend of XOOPS
Posts: 116
Since: 2003/3/1 1
2003/11/13 19:13
ackbarr
Posts: 1449
Since: 2002/10/2
//Code to retrieve priv_msgs from db omitted //assume that the timestamp is in $msg_time //To display a full date (according to your language settings) $mytime = formatTimestamp($msg_time); //To display a short date $mytime = formatTimestamp($msg_time, 's'); //To display in a custom date format (uses php date() function) $mytime = formatTimestamp($msg_time, 'Y-m-d H:i:s');
2003/11/13 22:41
function xoops_getUserTimestamp($time, $timeoffset="") { global $xoopsConfig, $xoopsUser; if ($timeoffset == '') { if ($xoopsUser) { $timeoffset = $xoopsUser->getVar("timezone_offset"); } else { $timeoffset = $xoopsConfig['default_TZ']; } } $usertimestamp = intval($time) + (intval($timeoffset) - $xoopsConfig['server_TZ'])*3600; return $usertimestamp; }
Advanced Search
178 user(s) are online (97 user(s) are browsing Support Forums)
Members: 0
Guests: 178