Why golang time.Parse supports fractional seconds even the formatString does not have them?

Viewed 39
1 Answers

According to the documentation for time.Parse:

When parsing, if the seconds value is followed by a decimal point and some digits, that is taken as a fraction of a second even if the layout string does not represent the fractional second.

Related