News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Builder.com.au:
Get the correct time by converting between time zones with PHP and PEAR
February 23, 2007 @ 10:11:00

On the Builder.com.au website today, there's a quick new tutorial on grabbing the correct time for a user's "home" rather than the server's time.

PHP comes with an extensive catalog of date and time functions, all designed to let you easily retrieve temporal information, massage it into a format you require, and either use it in a calculation or display it to the user. However, if you'd like to do something more complicated, things get much, much hairier

To make things easier, they enlist the service of the PEAR Date package to help bridge the gap between the time zones faster. They give some of the basics of using the package before actually getting into the time zone conversion. The code is pretty straight-forward and they even include other simple tips like how to calculate the GMT offset and how to add and subtract timespans.

0 comments voice your opinion now!
timezone pear date package difference gmt offset timezone pear date package difference gmt offset


blog comments powered by Disqus

Similar Posts

Bertrand Mansion's Blog: PHP with Itnl and Gettext on OSX Lion

Greg Beaver\'s Blog: PEAR 1.4.x branch is settling into comfortable stability

Community News: Latest PEAR Releases for 01.22.2007

Padraic Brady's Blog: OAuth Specification and Zend Framework/PEAR Proposal

PHPWomen.org: Bundled go-pear.phar broken in 5.2 windows releases


Community Events





Don't see your event here?
Let us know!


laravel series library code interview podcast bugfix configure developer api language list install application framework threedevsandamaybe introduction wordpress community release

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework