[asterisk-dev] AGI SAY DATETIME not working as expected

Bryant Zimmerman BryantZ at zktech.com
Fri Jan 29 10:03:54 CST 2010


Tilghman

Thanks for your response.
    
    1. Based on your respone the wiki is incorrect and the T option is not 
avaible as the time zone. It sounds like time zone prompts would need to be 
recored if nessassary then.
     http://www.voip-info.org/wiki/view/say+datetime. Should I be able to 
specify a full path to our custom prompts folders so that they don't get 
wiped durring upgrades?

    2.  As for specifying the [timezone] value. I tried putting in 
US/Centar and Central
        They are listed under /usr/share/zoneinfo/US
        
        Here is what I came up with. 
            1. If the time zone file is under /usr/share/zoneinfo   You can 
specify it by name and it will use it.
            2. If the time zone is under a sub folder 
/usr/share/zondinfo/US/  ie.. Central, Eastern   You must specify the full 
path so it can use it.  /usr/share/zondinfo/US/Central
            3. If you know the GMT numeric offset you can multiply it by -1 
and then pass it as a numeric as long as your time is in UTC

And confirmations of this would be apperciated. 
If this information is correct I will update the wiki with it so that 
others don't have to go throught the same trial and errors I have.

Thanks
Bryant

----------------------------------------

From: "Tilghman Lesher" <tlesher at digium.com>
Sent: Thursday, January 28, 2010 4:01 PM
To: bryantz at zktech.com, "Asterisk Developers Mailing List" 
<asterisk-dev at lists.digium.com>
Subject: Re: [asterisk-dev] AGI SAY DATETIME not working as expected 

On Thursday 28 January 2010 13:40:49 Bryant Zimmerman wrote:
> Can anyone give me some insight into the SAY DATETIME agi command.
>
> I am giving it a value like
> SAY DATETIME 1264686554 # ABdY'digits/at'IMpT Central
>
> When it says the date and time there are several issues.
> 1. According to the wicki the ABdY'digits/at'IMpT string should read
> the time zone on the end but it gives me the full military time instead 
of
> the time zone. How do I get it to read the time zone?

Well, there are no recordings for the name of the timezone, so you'd have 
to
provide your own in the single quotes to read back.

> 2. I have tried 
> many combinations for the [TIMEZONE] value. If I don't provide a value 
it
> reads the time in UTC if I provide any value it reads the time in the 
local
> machine time zone (Eastern). What should I be using for timezone values 
to
> get this to work correctly? I have tried Central, Eastern, Pacific,
> Mountain. I have tried putting US/ZoneValue and nothing seems to be
> working. I want to be able to have my app vary the time based on the 
time
> zone for the called party wich may be in a zone different from the Local
> Machine time zone.

Have you verified that the name of the zone you're looking for is a 
literal
file that can be found in /usr/share/zoneinfo on the Asterisk machine? If 
the
file is not there, it won't work. If you're on Solaris, the alternate
location is /usr/share/lib/zoneinfo.

On my system:
$ 
ls -ld /usr/share/zoneinfo/Eastern /usr/share/zoneinfo/Central 
/usr/share/zoneinfo/Mountain /usr/share/zoneinfo/Pacific 
/usr/share/zoneinfo/US
ls: cannot access /usr/share/zoneinfo/Eastern: No such file or directory
ls: cannot access /usr/share/zoneinfo/Central: No such file or directory
ls: cannot access /usr/share/zoneinfo/Mountain: No such file or directory
drwxr-xr-x 2 root root 4096 2010-01-14 00:18 /usr/share/zoneinfo/Pacific
drwxr-xr-x 2 root root 4096 2010-01-14 00:18 /usr/share/zoneinfo/US

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100129/773f0d65/attachment.htm 


More information about the asterisk-dev mailing list