note 41846 deleted from function.strftime by tomsommer
| From: | tomsommer@php.net | Date: | Fri, 23 Apr 2004 16:26:54 +0000 |
| Subject: | note 41846 deleted from function.strftime by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68681@lists.php.net to get a copy of this message | ||
Note Submitter: me@noginn.com
----
Here is a function I use to do strftime for a local timezone, without having to use the zones
language.
<?
function local_strftime($format, $timestamp) {
if(checkauth()) {
$timestamp = floor($timestamp + ((60*60) * $_SESSION['sostime']));
}
return strftime($format, $timestamp);
}
?>
checkauth() is a function which returns either true or false depending on whether a user is logged
in or not.
$_SESSION['sostime'] is where i store the hour offset, for example.
CET = "1"
Hawii = "-10"