I don't know why this isn't working. I want a button to automatically set the historical chart to the last X hours (X) being a custom property on the button, bound to a dropdown's selected value.
now = system.date.now()
old = system.date.addHours(now, (-1) * event.source.hours)
event.source.parent.startTime = old
event.source.parent.endTime = now
Start Date on the chart is bound to startTime and End Date is bound to endTime.
Why am I getting 1969 dates - and they're equal?