diff options
author | Michael Hamann <michael@content-space.de> | 2010-11-12 11:38:49 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2010-11-12 11:38:49 +0100 |
commit | b3c7ecd15d3192cb2a9718415d078bc5ddd636f8 (patch) | |
tree | d20184c769266efbd5d759440ce6a3b00e146490 /inc/common.php | |
parent | b190e58905738aad7360936a92ffdabbca95d160 (diff) | |
parent | 6d3e62599b5cf46a86b28e75049679f94025f26f (diff) | |
download | rpg-b3c7ecd15d3192cb2a9718415d078bc5ddd636f8.tar.gz rpg-b3c7ecd15d3192cb2a9718415d078bc5ddd636f8.tar.bz2 |
Merge branch 'sitemap'
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php index 881179f4b..18f782788 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1266,6 +1266,21 @@ function dformat($dt=null,$format=''){ } /** + * Formats a timestamp as ISO 8601 date + * + * @author <ungu at terong dot com> + * @link http://www.php.net/manual/en/function.date.php#54072 + */ +function date_iso8601($int_date) { + //$int_date: current date in UNIX timestamp + $date_mod = date('Y-m-d\TH:i:s', $int_date); + $pre_timezone = date('O', $int_date); + $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); + $date_mod .= $time_zone; + return $date_mod; +} + +/** * return an obfuscated email address in line with $conf['mailguard'] setting * * @author Harry Fuecks <hfuecks@gmail.com> |