SNS.yaml: start_time format space

In the start_time field of a SNS.yaml file, is the space between time and UTC optional or mandatory?

In the example file the field is described as:

# For fields that represent time of day (such as `start_time`), devs specify
# the value as a string in form "hh::mm UTC". Where hh is hour, and mm is minute.
# Only the UTC timezone is currently supported.

But I noticed that in the SNS.yaml file of WaterNeuron there was no space.

start_time: 16:00UTC 

So just curious if both are supported or not in order to compose an accurate regex. I guess not but, just wanted to double check.

Yes, start_time must end with \s+UTC, as defined here.

I noticed that the start time in WaterNeuron’s SnsInitPayload is actually secondsAfterUtcMidnight: 57600 which corresponds to 16 hours.

Most likely, the SNS.yaml file in their repo is not the one they used to submit the proposal.

1 Like

Thanks for the confirmation!

Then I should be good, I use following pattern to assert the format.

const timeOfDaySchema = z
	.string()
	.refine((time: string): boolean => /^([01]\d|2[0-3]):([0-5]\d) UTC$/.test(time.trim()), {
		message: "Value must be a valid time of day string in the form 'hh:mm UTC'."
	});