[asterisk-bugs] [Asterisk 0015078]: STRFTIME returns incorrect time
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon May 11 15:59:59 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 15:59 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:/#
======================================================================
----------------------------------------------------------------------
(0104553) alecdavis (reporter) - 2009-05-11 15:59
http://bugs.digium.com/view.php?id=15078#c104553
----------------------------------------------------------------------
not sure that explains the "GMT-12" changing to "+1200".
The timezone offset parameter '%z' prints +1200 when timezone is set to
'GMT-12'
In all cases, the timezone parameter '%Z' always printed "NZST"
dialplan code:
exten => _9.,1,NoOp(${STRFTIME(${EPOCH},GMT-12,%Z %z %C%y%m%d%H%M)})
printed
Console output: The Date and Time are correct. 200905112327
-- Executing [9045609100 at outbound:1] NoOp("SIP/100-09fc4128", "NZST
+1200 200905112327") in new stack
Issue History
Date Modified Username Field Change
======================================================================
2009-05-11 15:59 alecdavis Note Added: 0104553
======================================================================
More information about the asterisk-bugs
mailing list