note 97472 added to function.timezone-abbreviations-list

From: Date: Wed, 21 Apr 2010 20:58:12 +0000
Subject: note 97472 added to function.timezone-abbreviations-list
Groups: php.notes 
Request: Send a blank email to php-notes+get-168485@lists.php.net to get a copy of this message
This was driving me nuts so I'm adding a note here. Took a while to get the simple time zone abbreviation for a given time zone. If you have the name just do this: $dateTime = new DateTime(); $dateTime->setTimeZone(new DateTimeZone('America/Los_Angeles')); return $dateTime->format('T'); Will return PST ---- Server IP: 192.41.40.227 Probable Submitter: 64.60.156.46 ---- Manual Page -- http://www.php.net/manual/en/function.timezone-abbreviations-list.php Edit -- https://master.php.net/note/edit/97472 Del: integrated -- https://master.php.net/note/delete/97472/integrated Del: useless -- https://master.php.net/note/delete/97472/useless Del: bad code -- https://master.php.net/note/delete/97472/bad+code Del: spam -- https://master.php.net/note/delete/97472/spam Del: non-english -- https://master.php.net/note/delete/97472/non-english Del: in docs -- https://master.php.net/note/delete/97472/in+docs Del: other reasons-- https://master.php.net/note/delete/97472 Reject -- https://master.php.net/note/reject/97472 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168485) next »