Synopsis
Says a date and/or time to the caller.Syntax
SayUnixTime(unixtime,timezone,format)Description
Uses some of the sound files stored in /var/lib/asterisk/sounds to construct a phrase saying the specified date and/or time in the specified format.unixtime is the date/time to say, represented as a standard unix timestamp (number of seconds since 1 Jan 1970). If this parameter is omitted, the default value is the current date/time.
timezone specifies the timezone that the unixtime is in. If this parameter is omitted, the default value is the time zone of the computer. It sould be specified as a unix timezone (see your /usr/share/zoneinfo directory for a list of timezones known to your computer), for example, "Pacific/Samoa".
format is a string specifying in what way to say the date/time. It uses a format based on the strftime(3) unix system call, if you're familiar with that. If omitted, the default value is:
ABdY \'digits/at\' IMp
This would result in a phrase like this: "Monday January twenty first 2003 at seven fifty two p m". Note that the 'digits/at' part refers to the sound /var/lib/asterisk/sounds/digits/at.gsm, i.e. it is a relative pathname to a sound file.
SayUnixTime is Multi-Language-compliant. It will say the date/time in the language set by the channel or overriden with the SetLanguage command, if the localized sound files for that language are installed.
Format Codes
\'filename\' (1.4) filename (1.6+) | filename of a soundfile | In Asterisk version 1.4 backslash and single ticks (\') around the filename are required (but not in version 1.6). |
A or a | Day of week | Saturday, Sunday, ..., Friday |
B or b or h | Month name | January, February, ..., December |
d or e | numeric day of month | first, second, ..., thirty-first |
Y | Year | |
I(capital eye) or l(lower ell) | Hour, 12 hour clock | one, two, three, ..., twelve |
H | Hour, 24 hour clock | ?, oh one, oh two, ..., oh nine, ten, eleven, ..., twenty-three |
k | Hour, 24 hour clock | ?, one, two, three, ..., twenty three |
M | Minute | ?, oh one, oh two, ... ... |