Open APIs

 View Only
Expand all | Collapse all

TimeZone in data format

  • 1.  TimeZone in data format

    TM Forum Member
    Posted Dec 04, 2019 09:16
    Hello,
    I have a question concerning date format:

    We can see in examples such as TMF633, that date format is similar to:
    (..)
    "validFor": { "startDateTime": "2017-08-29T00:00", "endDateTime": "2018-03-25T00:00" },
    (..)

    Which timeZone are we taking into account? Local server timezone?

    Does the use of ISO_8601 UTC time Zone breaks TMF compatibility?
    e.g.:
    (..)
    "validFor": { "startDateTime": "2017-08-29T03:00Z", "endDateTime": "2018-03-25T03:00Z" },
    (..)

    Thanks and Regards,

    ------------------------------
    Marcos Donato da Silva
    Ericsson Inc.
    ------------------------------


  • 2.  RE: TimeZone in data format

    TM Forum Member
    Posted Dec 05, 2019 02:25

    Our APIs are conformant with OpenAPI specification (v2) where you'll find the basic data types defined. DateTime is defined in RFC3339 as a profile of ISO 8601.

    The following are then proper equivalent examples:

         "2019-12-05T00:00:00.000Z"
         "2019-12-05T05:30:00.000+05:30"
         "2019-12-04T19:00:00.000-05:00"

    Implementations should be liberal in what they accept and conformant in what they send.



    ------------------------------
    Vance Shipley
    SigScale
    ------------------------------



  • 3.  RE: TimeZone in data format

    TM Forum Member
    Posted Dec 05, 2019 08:08
    Thanks Vance for the sources. I think that we should stress that any date or date-time that is not decorated with a time offset should be considered strictly UTC. Most of the examples that I have seen in the Open API specs (and I have created some of them :) ) do not include time offsets, and so they are representing UTC.

    Hope it helps

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 4.  RE: TimeZone in data format

    TM Forum Member
    Posted Dec 05, 2019 08:37
    I think the only way to interpret a missing offset (timezone) is as local time. It is highly discouraged in RFC3339 but in some cases a device may have no knowledge of timezones.

    ------------------------------
    Vance Shipley
    SigScale
    ------------------------------



  • 5.  RE: TimeZone in data format

    TM Forum Member
    Posted Dec 05, 2019 09:51
    Thanks Vance for the clarification/correction. It looks as if the API team needs to provide clarity on the way to interpret dates and times as per the OpenAPI (Swagger) spec. Watch this space (metaphorically).

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 6.  RE: TimeZone in data format

    Posted Dec 09, 2019 09:59
    I think that we should stress that any date or date-time that is not decorated with a time offset should be considered strictly UTC.

    Having suffered from poor date handling (mostly of my own doing!) in the past I respectfully think this might not be a good idea. Any date handling libraries I've worked (Javascript, Java, Go, Rust) with tend to treat ISO8601 date strings that don't have a time offset or a timezone indicator (e.g. 'Z') as being in local time.

    The spec itself states as much.

    I wouldn't leave it to API clients to have to make assumptions!

    All the best.

    ct




    ------------------------------
    Ciaran Treanor
    DANU Technologies Ireland ltd.
    ------------------------------



  • 7.  RE: TimeZone in data format

    TM Forum Member
    Posted Dec 09, 2019 10:07
    Hi Ciaran

    Perhaps you saw that Vance already corrected me :). We have opened a JIRA issue so that time handling can be discussed within the Open API team, and hopefully we will achieve closure on this.

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 8.  RE: TimeZone in data format

    Posted Dec 09, 2019 10:42
    Hi Jonathan,

    Strange - I posted my reply some time last week (possibly Friday) so hadn't seen Vance's response. Regardless, thanks for addressing this!

    All the best.

    Ciaran


  • 9.  RE: TimeZone in data format

    Posted Jan 15, 2021 11:07

    Hi Jonathan, 

    Any news on this ?
    What is the guidance?



    ------------------------------
    Bernard TOKO
    Ciena Corporation
    ------------------------------



  • 10.  RE: TimeZone in data format

    TM Forum Member
    Posted Jan 17, 2021 03:16
    Hi Bernard
    Apologies but this appears to have "fallen through the cracks".
    I've sent a reminder to my colleagues to ensure that we update the documentation (design guidelines) accordingly.
    Thanks for calling this one out.

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 11.  RE: TimeZone in data format

    Posted Apr 26, 2023 03:58

    Jonathan, in 
    https://www.tmforum.org/resources/standard/tmf630-rest-api-design-guidelines-4-2-0/

    I still see nothing. Maybe looking the wrong way?
    (Or maybe cracks are wider than one wishes? :)



    ------------------------------
    ALEXANDER PETROSSIAN
    TO BE VERIFIED
    ------------------------------



  • 12.  RE: TimeZone in data format

    Posted Nov 07, 2023 07:27

    I don't see any update regarding timestamp in api design guidelines.

    Can someone please share the relevant document link here.



    ------------------------------
    Shadab Mohammad
    Bharti Airtel Ltd
    ------------------------------



  • 13.  RE: TimeZone in data format

    TM Forum Member
    Posted Nov 09, 2023 01:27

    Hi Shadab and all

    We discovered that the Jira relating to this issue had been inadvertently been closed. It's now been re-opened, and after discussion in our governance meeting, has been assigned for treatment. Cannot promise a quick resolution, but at least the train is back on the rails.



    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 14.  RE: TimeZone in data format

    TM Forum Member
    Posted 27 days ago

    Hi Jonathan,

    I have run the CTK and it seems the problem to be still open. Could you let me when there will be the fix in CTK? 



    ------------------------------
    Radoslaw Gembarowski
    Comarch S.A.
    ------------------------------