REST API Timestamp for downtimes Problem

Hi,
we schedule downtimes in Icinga by the REST Api. It works very fine but one problem occurs and we are not sure if it is on client- or server side.
As required we set the start- and end-Time in JSON with the UNIX-Timestamp format.
If we set the downtime before the summer-/wintertime change occurs and the downtime should start in future (after the regular timechange) the Icinga calculates the downtimestart with time change shifts.
For instance:

  • downtime should scheduled at 22-03-31 08:00 AM Europe/Berlin
  • I set the downtime by REST API at 22-03-24 08:00 AM Europe/Berlin (before the summertime change for our time zone occurs)
  • the summertime change for our timezone (Berlin) occurs at 22-03-27 02:00 AM
  • In Icinga you will se the downtime start scheduled at 22-03-31 09:00 AM Europe/Berlin
    The API has implicit converted the time for new summer time

Our question: Is this as expected? Hypothetical: as a client (the tool which posts the JSON to ICINGA), I could not know in which timezone the Icinga server resides. So If I say, I want to set the downtime at … regardless, if a timeshift occurs or not.
Of course I could change the client logic to notice the time change time shift when generating the JSON.

Many Thanks
Peter

Hi,
it was an error in calculation of the UNIX Timestamp by me.
I generate the target UNIX TS for the downtimestart at the time when the summertime isn’t active yet. So the UNIX TS sending to Icinga was wrong.
Reading my blog post again let me look into the source code together with my collegue of the client and I see the misstake.
Cheers Peter