note 41846 added to function.strftime

From: Date: Fri, 23 Apr 2004 14:05:43 +0000
Subject: note 41846 added to function.strftime
Groups: php.notes 
Request: Send a blank email to php-notes+get-68670@lists.php.net to get a copy of this message
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" ---- Manual Page -- http://www.php.net/manual/en/function.strftime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41846 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41846&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41846&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68670) next »