agent/api/statechange.go
func (change *TaskStateChange) SetTaskTimestamps() {
	if change.Task == nil {
		return
	}

	// Send the task timestamp if set
	if timestamp := change.Task.GetPullStartedAt(); !timestamp.IsZero() {
		change.PullStartedAt = aws.Time(timestamp.UTC())
	}
	if timestamp := change.Task.GetPullStoppedAt(); !timestamp.IsZero() {
		change.PullStoppedAt = aws.Time(timestamp.UTC())
	}
	if timestamp := change.Task.GetExecutionStoppedAt(); !timestamp.IsZero() {
		change.ExecutionStoppedAt = aws.Time(timestamp.UTC())
	}
}
func (change *TaskStateChange) SetTaskTimestamps() {
	if change.Task == nil {
		return
	}

	// Send the task timestamp if set
	if timestamp := change.Task.GetPullStartedAt(); !timestamp.IsZero() {
		change.PullStartedAt = aws.Time(timestamp.UTC())
	}
	if timestamp := change.Task.GetPullStoppedAt(); !timestamp.IsZero() {
		change.PullStoppedAt = aws.Time(timestamp.UTC())
	}
	if timestamp := change.Task.GetExecutionStoppedAt(); !timestamp.IsZero() {
		change.ExecutionStoppedAt = aws.Time(timestamp.UTC())
	}
}
// SetTaskTimestamps adds the timestamp information of task into the event
// to be sent by SubmitTaskStateChange