IBM Support

IZ22841: THE DATETOTIME FUNCTION WITH THE RULES FILE IS USED TO CONVERT ATEXTUAL REPRESENTATION OF A TIMESTIME INTO UNIX EPOCH TIME

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as documentation error.

Error description

  • The DateToTime function with the rules file is used to convert a
    textual representation of a timestime into UNIX epoch time
    (seconds since 00:00:00 1st Jan 1970 GMT).
    
    It is a wrapper around the strptime() function provided by the
    underlying operating system.
    
    However, the conversion of timezones using %Z is not supported
    if the timezone in the string is not the same timezone as the
    probe's runtime environment.
    
    The OMNIbus documentation (Probe and Gateway Guide) has the
    following description:
    
    http://publib.boulder.ibm.com/infocenter/tivihelp/v3r1/index.jsp
    ?topic=/com.ibm.netcool_OMNIbus.doc/pg/CACJCEEE.html
    
    "
    Date and Time Functions
    
    Function:
     datetotime(string, conversion_specification)
    Description:
     Converts a string into a time data type using the C library
    function strptime(). See the man page for strptime for more
    information.
    Example:
     $Date = datetotime("Tue Dec 19 18:33:11 GMT 2000", "%a %b %e %T
    %Z %Y")
    "
    
    Suggestion for documentation changes:
    
    1) Change the example (removing the timezone):
     $Date = datetotime("Tue Dec 19 18:33:11 2000", "%a %b %e %T
    %Y")
    
    2) Add a comment such as the following (after being rewritten
    for clarity!) to the Description:
    
    "
    Note that the timezone conversion specification (%Z) can only be
    used if the timezone in the string is the same as the timezone
    of the probe's runtime environment.
    
    This is a limitation of the strptime() function call provided by
    the Operating System
    "
    

Local fix

  • 1) Extract the timezone string from the date to be converted
    2) Use DateToTime() to convert the remaining string
    3) Add/Subtract the appropriate number of seconds offset based
    on the timezone (with the knowledge of which exact timezone that
    relates to).
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of Probe and Gateway Reference     *
    *                 Guide.                                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: IBM Tivoli Netcool/OMNIbus Probes and   *
    *                      Gateway Reference Guide should provide  *
    *                      more information about the datetotime   *
    *                      function.                               *
    ****************************************************************
    * RECOMMENDATION:                                              *
    *                                                              *
    ****************************************************************
    
    
    1. Change the description given for the datetotime function as
    below:
    
    Use this function to convert a textual representation of a
    timestime into UNIX epoch time (time since 00:00:00 1 Jan 1970
    GMT).
    
    2. Add the following note to the description of the datetotime:
    
    Use the timezone conversion specification (%Z) only if the
    timezone of the string is same as the probe's runtime
    environment.
    
    3. Replace the existing example with the following example with
    correct date to time format:
    
    = datetotime(Tue Dec 19 18:33:11 2000, %a %b %e %T %Y)
    

Problem conclusion

  • The product documentation was updated with the 7.2.1 release of
    OMNIbus.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ22841

  • Reported component name

    ERICSSON 3GPP O

  • Reported component ID

    5724P18ER

  • Reported release

    100

  • Status

    CLOSED DOC

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-05-26

  • Closed date

    2008-08-22

  • Last modified date

    2008-08-22

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Publications Referenced
SC23638700    

Fix information

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCM7QJ","label":"Ericsson 3GPP (OSS-RC\/RANOS\/CNOS)"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"100","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
22 August 2008