It's kind of random :) same has been my experience.
> From: [email protected] > To: [email protected] > Subject: RE: [on-asterisk] Resolved: [on-asterisk] Timezones and Asterisk > 1.4.21 ExecIfTime() application > Date: Tue, 10 May 2016 20:11:43 +0000 > > Is it alive? I've tried posting many times... lets see. > > -----Original Message----- > From: B N [mailto:[email protected]] > Sent: May 10, 2016 4:02 PM > To: Lew Pitcher <[email protected]>; asterisk Mailing > <[email protected]> > Subject: RE: [on-asterisk] Resolved: [on-asterisk] Timezones and Asterisk > 1.4.21 ExecIfTime() application > > Great to know that TAUG mail list is still alive. I thought it is not. > - Bruce > > > From: [email protected] > > To: [email protected] > > Date: Mon, 9 May 2016 14:04:07 -0400 > > Subject: [on-asterisk] Resolved: [on-asterisk] Timezones and Asterisk > > 1.4.21 ExecIfTime() application > > > > On Monday May 9 2016 12:08:15 Lew Pitcher wrote: > > > I have an IP04 embedded Linux/Asterisk 4port PBX (from Rowetel) that > > > I've been working with. Prior to this morning, I had Asterisk 1.4.4 > > > installed on it, but it now (as of about an hour ago) has Asterisk 1.4.21 > > > installed. > > [snip] > > > In Asterisk 1.4.4, the three ExecIfTime() application calls executed > > > true consistant with the local time, as expressed in the TZ envvar. > > > That is to say, at 11:00 EDT, the 1st ExecIfTime() would trigger > > > true, and play back the "Good Morning" message, while at 13:00 EDT, > > > the 1st ExecIfTime would trigger false, and the 2nd would trigger > > > true, playing back the "Good Afternoon" message. > > > > > > Now, with no changes to system clock or TZ, and still exporting the > > > TZ value prior to starting Asterisk, Asterisk 1.4.21 evaluates the > > > first ExecIfTime false at 11:00 EDT, and the 2nd ExecIfTime true, > > > and plays the "Good Afternoon" message. It appears that 1.4.21 is > > > ignoring the timezone and using the system UTC clock. > > > > > > I cannot find any config file options to correct this behaviour. > > > > > > Can anyone suggest a way to (unobtrusively) get this version of > > > Asterisk to use the TZ envvar for ExecIfTime() evaluation? > > > > I fixed it. > > > > Apparently, something changed between 1.4.4 and 1.4.21 that caused > > Asterisk to ignore the TZ envvar in favour of the (properly formatted) > > contents of the /etc/localtime file. > > > > The IP04 doesn't come with a timezone package, and there was no > > /etc/localtime file on the device. > > > > To fix the issue, I copied the /etc/localtime from my (EST5EDT) > > Slackware system, and restarted Asterisk. All is well now; the > > ExecIfTime() application now properly recognizes the local time and > > plays back the appropriate greeting. > > > > -- > > Lew Pitcher > > "In Skills, We Trust" > > PGP public key available upon request > > >
