Page 1 of 1
Intervals: Consistent reference point in time
Posted: Fri Feb 10, 2017 12:10 pm
by otsjw
I understand the intervals are “A time window specified by start time and end time. The attributes must be specified in [sec] from a consistent reference point in time on (for example 0:00 next day or 0:00 1 January 1970).”…but where exactly is ‘the consistent reference point in time’ specified? Do we set that in the server, in our call, or do we not set it at all?
Thanks in advance
Re: Intervals: Consistent reference point in time
Posted: Fri Feb 10, 2017 12:38 pm
by Bernd Welter
Hello Joe,
good question: it's all in your brain... YOU can decide which point in time is the context of the planning call.
E.g.
- 1.1.1970, 00:00
- midnight of the current planning week
- 14.2.2017 = valentine's day
Based on this REFERENCE datetime choosen by you you have to calculate the intervals based on datetime functions.
Important to understand is just that each timestamp statement in the response refers to the same REFERENCE datetime used in the input. So no matter which date you use: just be aware of the context.
I hope the screenshot here demonstrates what I meant.
- Three different reference dates - all produce same result ;-)
You can then store your reference date somewhere in your applications configuration and read it within the programm. Or you store it in the database as a CONST each application has to refer to. While you execute the programm and planning calls you have to know it...
Best regards Bernd