eclipse-symphony / symphony

Symphony project
MIT License
27 stars 17 forks source link

Change ScheduleSpec to Datetime #259

Open FireDefend opened 2 weeks ago

FireDefend commented 2 weeks ago

Hi team, do you think it is possible to use datetime type instead of ScheduleSpec? Arm team is suggesting us to change it.

type ScheduleSpec struct { Date string json:"date" Time string json:"time" Zone string json:"zone" }

type StageSpec struct { ... Schedule *ScheduleSpec json:"schedule,omitempty" }


type StageSpec struct { ... Schedule time.Time json:"datetime" }

Haishi2016 commented 2 weeks ago

Think of usability scenarios: Schedule a deployment at 5PM on Friday (local time).

FireDefend commented 2 weeks ago

OpenAPI spec is using ISO 8601. It will support offset date time(local time). I think we can use the same standard to parse in symphony code. https://www.iso.org/iso-8601-date-and-time-format.html