<h1>Project "FreeSWITCH Source" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
via: 526e6fe48cadc9418d64f2b639bad68d8883dcdd (commit)
from: 8c12162a9d92ceac55c6305f2336efcf7157b923 (commit)
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Anthony Minessale
comments:
FS-3038
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c</span>
<span style="color: #000080; font-weight: bold">index 807770a..f34042a 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_commands/mod_commands.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_commands/mod_commands.c</span>
<span style="color: #800080; font-weight: bold">@@ -4439,19 +4439,23 @@ SWITCH_STANDARD_API(strftime_tz_api_function)</span>
                if ((format = strchr(mycmd, ' '))) {
                        *format++ = '\0';
<span style="color: #A00000">-                }</span>
                
<span style="color: #A00000">-                if ((p = strchr(format, '|'))) {</span>
<span style="color: #A00000">-                        *p++ = '\0';</span>
<span style="color: #A00000">-                        when = atol(format);</span>
<span style="color: #A00000">-                        format = p;</span>
<span style="color: #00A000">+                        if (format && (p = strchr(format, '|'))) {</span>
<span style="color: #00A000">+                                *p++ = '\0';</span>
<span style="color: #00A000">+                                when = atol(format);</span>
<span style="color: #00A000">+                                format = p;</span>
<span style="color: #00A000">+                        }</span>
                }
        }
<span style="color: #A00000">-        if (switch_strftime_tz(tz_name, format, date, sizeof(date), when * 1000000) == SWITCH_STATUS_SUCCESS) {        /* The lookup of the zone may fail. */</span>
<span style="color: #00A000">+        if (zstr(format)) {</span>
<span style="color: #00A000">+                format = "%Y-%m-%d";</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+        </span>
<span style="color: #00A000">+        if (format && switch_strftime_tz(tz_name, format, date, sizeof(date), when * 1000000) == SWITCH_STATUS_SUCCESS) {        /* The lookup of the zone may fail. */</span>
                stream->write_function(stream, "%s", date);
        } else {
<span style="color: #A00000">-                stream->write_function(stream, "-ERR Invalid Timezone\n");</span>
<span style="color: #00A000">+                stream->write_function(stream, "-ERR Invalid Timezone/Format\n");</span>
        }
        switch_safe_free(mycmd);
</pre></div>
========================================================================<pre>
Summary of changes:
src/mod/applications/mod_commands/mod_commands.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>