[asterisk-bugs] [Asterisk 0012374]: STRPTIME does not respect time dayligh saving time

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Apr 7 08:25:29 CDT 2008


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12374 
====================================================================== 
Reported By:                johan
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   12374
Category:                   Core-General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.19 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-06-2008 20:27 CDT
Last Modified:              04-07-2008 08:25 CDT
====================================================================== 
Summary:                    STRPTIME does not respect time dayligh saving time
Description: 
STRPTIME is an hour off because of daylight saving time.

This dialplan:
  Set(datewithtz=${STRFTIME(${EPOCH},Europe/Stockholm,%Y-%m-%d
%H:%M:%S)});
  Set(datenotz=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)});
  Noop(${STRPTIME(${datewithtz},GMT-2,%Y-%m-%d %H:%M:%S)});
  Noop(${STRPTIME(${datewithtz},Europe/Stockholm,%Y-%m-%d %H:%M:%S)});
  Noop(${EPOCH});

prints this:
 Set("datewithtz=2008-04-07 03:22:08") in new stack
 Set("datenotz=2008-04-07 03:22:08") in new stack
 NoOp("1207531328") in new stack   <--- this one is right (workaround) 
 NoOp("1207534928") in new stack   <--- this one is wrong (should work)
 NoOp("1207531328") in new stack   <--- this is EPOCH.

As you see the result is off by an hour. STRFTIME works fine but STRPTIME
does not.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-07-08 08:25  file           Assigned To               => Corydon76       
======================================================================




More information about the asterisk-bugs mailing list