Timezone functions
| From: | David Gillies | Date: | Thu, 06 Feb 2003 17:43:02 +0000 |
| Subject: | Timezone functions | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-94073@lists.php.net to get a copy of this message | ||
My module exposes a single function,
timezone_offset(). From the module code:
proto int timezone_offset(string zfVal,int timeVal)
Return offset from GMT for specified timezone file at
specified Unix time. Both parameters are optional.
Default is /etc/localtime (unless overridden in
initialisation file) and current time of day as
returned by time().
In other words, if you call
timezone_offset("/usr/share/zoneinfo/Europe/Warsaw",482791331)
then it will give you the deviation from UTC in Poland
on 19th April 1985 at 14:42:11. It works by parsing
files in tzfile(5) format.
Can someone point me at a description of the procedure
to make a contribution to PEAR or PECL?
David Gillies
> if i grasp u, my new 'idate("Z")' 'll do the job
> for u.
>
> moshe
> --
>
--- Moshe Doron <mosdoron@netvision.net.il> wrote:
> "David Gillies" <daggillies@yahoo.com> wrote in
> message
>
news:20030206161742.16804.qmail@web41409.mail.yahoo.com...
> > In a similar itch-scratching moment I whipped up a
> > trivial PHP module that groks tzfile timezone
> files to
> > give you the offset from GMT at any time in the
> Unix
> > epoch.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com