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

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


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=15078 
====================================================================== 
Reported By:                alecdavis
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15078
Category:                   Functions/func_strings
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
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 16:16 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:/#


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

---------------------------------------------------------------------- 
 (0104556) tilghman (administrator) - 2009-05-11 16:16
 http://bugs.digium.com/view.php?id=15078#c104556 
---------------------------------------------------------------------- 
alecdavis:  that is 100% dependent upon the contents of the zoneinfo file. 
This is therefore not an Asterisk issue.  If you want to contest the values
within your zoneinfo file, please open an issue with your Linux
distribution. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-11 16:16 tilghman       Note Added: 0104556                          
======================================================================




More information about the asterisk-bugs mailing list