[asterisk-dev] POSIX timezone handling

Henning Holtschneider henning at loca.net
Mon Oct 1 03:45:28 CDT 2007


On Mon, 1 Oct 2007 10:06:26 +0200 Tzafrir Cohen
<tzafrir.cohen at xorcom.com> wrote:

> On Mon, Oct 01, 2007 at 09:26:25AM +0200, Henning Holtschneider wrote:
> > Hi,
> >
> > I've got a system which only provides POSIX-style timezone
> > information through /etc/TZ and the TZ environment variable.
> > Unfortunately, Asterisk doesn't seem to care about the timezone and
> > defaults to GMT.
> 
> What system is it?

It's an embedded system running uClibc.

> Isn't it a matter for libc to do this dirty work?

I thought so, but if I look at the code in main/stdtime/localtime.c, it
seems as if Asterisk parses the zoninfo files itself. The sparse
comments indicate that there is support for POSIX timezones, too. But I
don't understand how the code is supposed to distinguish between
zoneinfo files and a POSIX-style timezone definition (see
<http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html>
for the definition of the POSIX TZ format).

I can copy a valid zoneinfo file onto the device and symlink it
to /etc/localtime, but the zoneinfo files are way too big to be used
on my device.

Best regards,
Henning Holtschneider
--
LocaNet oHG - http://www.loca.net
Lindemannstrasse 81, D-44137 Dortmund
tel +49 231 91596-25, fax +49 231 91596-55
sip 25 at voip.loca.net

Registergericht Amtsgericht Dortmund HRA 14208
Geschäftsführer Sven Haufe, Henning Holtschneider
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20071001/187d3e90/attachment.pgp 


More information about the asterisk-dev mailing list