#2606 CMPIDateTime getBinaryFormat and pre-epoch times

closed
sfcb (1090)
5
2013-02-05
2013-02-05
No

Apparently, CMPIDateTime can handle pre-epoch representations, e.g. when calling CMNewDateTimeFromChars() with "19690101000000.000000+000".

However, getBinaryFormat fails on this date because the implementation (datetime.c: chars2bin()) calls 'mktime' for validation and mktime is unable to handle pre-epoch times.

Reading through the CMPI 2.0 standard, the binary date representation should be 'long long', thus allowing negative (pre-epoch) values.

Discussion

  • Klaus Kämpf

    Klaus Kämpf - 2013-02-05
    • status: open --> closed
     
  • Klaus Kämpf

    Klaus Kämpf - 2013-02-05

    Oh, its an oversight of the CMPI 2.0 standard, explicitly requesting getBinaryFormat to return an unsigned 64bit value.

    I'll guess I have to file a bug at opengroup.org then.

     

Log in to post a comment.