Maximo Open Forum

 View Only
  • 1.  MAXIMO datetimestamp in the JSON payload for MAXIMO OSLC JSON Rest API

    Posted 11-08-2021 19:27
    Hello,

    We do the integration with MAXIMO and other business applications using OSLC JSON Rest API.

    For updating rows in MAXIMO, we set the value of the MBO's columns with datetime stamp with the following format: 

    '%Y-%m-%dT%H:%M:%S-07:00  (i.e. 7 hours behind UTC). 

    However from yesterday (until the day light saving begin), it is 8 hours behind UTC.

    Does this mean that we need to keep maintaining the code that produces the JSON Payload for -7:00 or -8:00.

    Is there any other format or way which will work irrespective of day light saving start/ends?

    Pankaj Bhide



    #Customizations
    #MaximoUserGroups

    ------------------------------
    Pankaj Bhide
    Berkeley National Laboratory
    ------------------------------


  • 2.  RE: MAXIMO datetimestamp in the JSON payload for MAXIMO OSLC JSON Rest API

    Posted 11-08-2021 20:39
    Answering myself after reading on this. The program that produces the json can find out whether the day light time saving is on or not and based upon it, subtract the UTC difference.

    In Python 

    port time
    t1=time.localtime()
    print (t1)
    print (t1.tm_isdst)


    ------------------------------
    Pankaj Bhide
    Berkeley National Laboratory
    ------------------------------



  • 3.  RE: MAXIMO datetimestamp in the JSON payload for MAXIMO OSLC JSON Rest API

    Posted 11-10-2021 09:22
    I think I responded in the IBM forum, but I wouldn't provide the offset unless you expect to be sending a variety of offsets. Maximo will use the time zone of the user by default which will handle the offsets for you.

    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 4.  RE: MAXIMO datetimestamp in the JSON payload for MAXIMO OSLC JSON Rest API

    Posted 11-10-2021 10:32
    Thanks Steve. I will try that.

    Pankaj Bhide