[asterisk-bugs] [Asterisk 0015078]: STRFTIME returns incorrect time

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 11 06:52:02 CDT 2009


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=15078 
====================================================================== 
Reported By:                alecdavis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15078
Category:                   Functions/func_strings
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-05-11 06:52 CDT
Last Modified:              2009-05-11 06:52 CDT
====================================================================== 
Summary:                    STRFTIME returns incorrect time
Description: 
For NZ (GMT+12) function STRFTIME seems to require GMT-12 to get the date
and time right.

by example, the date and time now in NZ is 11th May 2009 , 11:27PM

Dialplan code:
exten => _9.,1,NoOp(${STRFTIME(${EPOCH},GMT-12,%Z %z %C%y%m%d%H%M)})
exten => _9.,n,Set(CallTime=${STRFTIME(${EPOCH},GMT-12,%C%y%m%d%H%M)})
exten => _9.,n,Set(CALLFILENAME=${CallTime}_${CALLERID(num)})

Console output: The Date and Time are correct. 200905112327
    -- Executing [9045609100 at outbound:1] NoOp("SIP/100-09fc4128", "NZST
+1200 200905112327") in new stack
    -- Executing [9045609100 at outbound:2] Set("SIP/100-09fc4128",
"CallTime=200905112327") in new stack

System time:
========================================
asterisk:/# date
Mon May 11 23:27:44 NZST 2009
asterisk:/#


====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-11 06:52 alecdavis      New Issue                                    
2009-05-11 06:52 alecdavis      Asterisk Version          => SVN             
2009-05-11 06:52 alecdavis      Regression                => No              
2009-05-11 06:52 alecdavis      SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list