Forum Moderators: coopster
## function offset_date
## format; same as php function date
## offset; offset seconds; ie: GMT+3 3*60*60
function offset_date($format, $unix_timestamp, $offset=0) {
$unix_timestamp = empty($unix_timestamp) ? time()+$offset : $unix_timestamp+$offset;
return @gmdate($format, $unix_timestamp);
}
function ISOdate2UNIXtime($ISOdate) {
return gmmktime(substr($ISOdate,11,2),substr($ISOdate,14,2),substr($ISOdate,17,2),substr($ISOdate,5,2),substr($ISOdate,8,2),substr($ISOdate,0,4));
}