Layer7 API Management

 View Only
  • 1.  Set context variable to Timestamp in seconds not possible?

    Posted Dec 13, 2024 07:38 AM

    Hello,

    As suggested in Layer7 API Management

    It should be possible to generate a future timestamp in seconds. But somehow I cannot change this timestamp to <Second Timestamp>. I allways get the UTC timestamp.
    I use the V11.0.00.17019-CR02 container version.



    ------------------------------
    Greetings,
    Sebastian van Voorn.
    Sr. System Engineer
    RDW
    ------------------------------


  • 2.  RE: Set context variable to Timestamp in seconds not possible?

    Broadcom Employee
    Posted Dec 13, 2024 12:32 PM

    HI Sebastian 

     You can get the content of that variable in seconds (epoch time ) when you use it like 

    you can get the value of the variable containing the date/time in seconds in the following way 

    ${exptim.seconds}

    see following part in the docs for more option 

    https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-1/reference/context-variables/date-and-time-variables.html

    Regards

    Dirk 




  • 3.  RE: Set context variable to Timestamp in seconds not possible?

    Posted Dec 17, 2024 04:00 AM

    Hello Dirk,

    That was very helpful. What a simple solution.

    I suggest to improve the documentation with this casting feature of the date-time variable. I could not understand this from the documentation.

    Thanks.



    ------------------------------
    Greetings,
    Sebastian van Voorn.
    Sr. System Engineer
    RDW
    ------------------------------



  • 4.  RE: Set context variable to Timestamp in seconds not possible?

    Broadcom Employee
    Posted Dec 18, 2024 10:28 AM

    Every page in our documentation has a link at the bottom for "Content feedback and comments".  If you ever notice something incorrect or unclear, we encourage you to use that link and provide some specific and constructive feedback on how the page could be improved.  Our documentation team is generally very responsive to these requests.