Comment on page
Time - script API
StackState Self-hosted v5.0.x
This page describes StackState version 5.0.
Returns a time slice for the current timestamp
Time.currentTimeSlice().then { slice ->
Topology.query('environments in ("Production")')
.at(slice)
.components()
.thenCollect { component ->
Component
.withId(component.id)
.at(slice)
.get()
}
}
Format an instant to string using the given formatting pattern
Format an instant to ISO 8601 time
Time.format(1577966400000, "yyyy-MM-dd'T'HH:mm:ss'Z'")
Convert a string timestamp to epoch
Time.epochMs("2011-12-03T10:15:30Z")
Last modified 1yr ago