Programming Tips - How can I get the name of the local time zone?

Date: 2014nov25 Language: php Q. How can I get the name of the local time zone? A. 'T' from the date() function will do it. You do not have to give date() a time since it doesn't matter for the timezone.
<?php # This is what you usually want - eg "EST" function getTimeZoneAbbrev() { return date('T'); } function getTimeZoneName() { return date('e'); } # Example use print getTimeZoneName(); ?>