I try both "tz-offset" (per tag) and "tod_tz_offset" and it doesn't seem to have any effect can someone please confirm that I'm doing the right thing and is someone else using it successfully?
Here is my test dialplan:
  <section name="dialplan" description="Regex/XML Dialplan">
    <context name="public">
      <extension name="test">
        <condition break="never">
          <action application="set" data="ringback=$${us-ring}"/>
          <action application="set" data="timezone=America/New_York" inline="true"/>
          <action application="set" data="tod_tz_offset=-4" inline="true"/>
          <action application="log" data="CRIT ${strftime_tz(America/New_York %b %d %Y %H:%M:%S)}"/>
        </condition>
        <condition tz-offset="-4" mon="9" mday="24" minute-of-day="900-1200"  break="on-true">
          <action application="transfer" data="30 XML default" />
        </condition>
      </extension>
    </context>
  </section>
I see the log logging the correct time, however the second condition is never getting matched based on the tod_tz_offset variable or tz-offset tag. if anyone can point me in the right direction I will update the documentation.


On 11/30/2011 7:10 AM, Avi Marcus wrote:
Thanks Anthony!

I update the wiki at http://wiki.freeswitch.org/wiki/Tod if anyone else can test and confirm this feature (on git > 2011-11-08 / revision 65a756643a45a9462270a83238a396d742b7103f)

The TOD doc page could be streamlined a bit, too..

-Avi

On Tue, Nov 8, 2011 at 12:39 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
I looked into what the code would require and decided to push a patch, now you get to test and document it.

if you get the variable tod_tz_offset set on the channel before it hits the dialplan extension in question it will apply that offset to gmt so you can set it to say, -6 for central time.

Note, you must have it set first so you either need to use inline set or maybe it will work if you have already defined it in your user directory.

also on a per-tag basis, you can do tz-offset attr ...




On Mon, Nov 7, 2011 at 4:20 PM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
on multi home you are better off exploring xml_curl to do time of day stuff, what you suggest would require some new code for sure.


On Mon, Nov 7, 2011 at 4:10 PM, Michael Collins <msc@freeswitch.org> wrote:

On Mon, Nov 7, 2011 at 11:37 AM, Avi Marcus <avi@avimarcus.net> wrote:
Note: The dialplan TOD conditions do not account for TZ 
I think that's the point of this thread. Is there a point to re-invent the wheel doing TOD conditions manually?

No, the issue is a matter of supply and demand. The skills needed to add TZ directly into the dialplan are in short supply, whereas doing TZ stuff manually in the dialplan is all but trivial and does not require C coding skills. Also, the demand for TZ checking is relatively low. 

If it's really desired then a bounty should be put up.

-MC





--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900



--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900


FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org