Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#36 Use POSIX::strftime for date conversion

2.0x
closed-out-of-date
Martin Kutter
5
2008-12-08
2008-05-08
Martin Kutter
No

Noah found the following:

$ perl bm.pl
Benchmark: 100000 iterations of [%Y-%m-%dT%H:%M:%S%z]
POSIXDate: 1.396331
POSIXDate(avg): 1.396331e-05 sec/iteration
DateFormatDate: 9.172891
DateFormatDate(avg): 9.172891e-05 sec/iteration

POSIX::strftime is faster, and issues less (unneccessary) warnings.

Thus, SOAP::WSDL's date, dateTime and time classes should use POSIX::strftime instead of Date::Format

Discussion

  • Martin Kutter
    Martin Kutter
    2008-06-22

    Logged In: YES
    user_id=884175
    Originator: YES

    Unfortunately, POSIX' and Date::Format's strftime() differ in their handling of timezone data. May be a bit harder than first thought...

     
  • Martin Kutter
    Martin Kutter
    2008-12-08

    • status: open --> closed-out-of-date
     
  • Martin Kutter
    Martin Kutter
    2008-12-08

    Obsolete as of rev757 - non-XML-formatted data is now formatted by sprintf if it contains a timezone. The warnings are removed in the test script itself.