mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Update time marshalling format to provide 3 digits of ms (#630)
This commit is contained in:
@@ -33,19 +33,19 @@ type TimeSuite struct {
|
||||
func (suite *TimeSuite) TestISO8601Format1() {
|
||||
testTime := testrig.TimeMustParse("2022-05-17T13:10:59Z")
|
||||
testTimeString := util.FormatISO8601(testTime)
|
||||
suite.Equal("2022-05-17T13:10:59.00Z", testTimeString)
|
||||
suite.Equal("2022-05-17T13:10:59.000Z", testTimeString)
|
||||
}
|
||||
|
||||
func (suite *TimeSuite) TestISO8601Format2() {
|
||||
testTime := testrig.TimeMustParse("2022-05-09T07:34:35+02:00")
|
||||
testTimeString := util.FormatISO8601(testTime)
|
||||
suite.Equal("2022-05-09T05:34:35.00Z", testTimeString)
|
||||
suite.Equal("2022-05-09T05:34:35.000Z", testTimeString)
|
||||
}
|
||||
|
||||
func (suite *TimeSuite) TestISO8601Format3() {
|
||||
testTime := testrig.TimeMustParse("2021-10-04T10:52:36+02:00")
|
||||
testTimeString := util.FormatISO8601(testTime)
|
||||
suite.Equal("2021-10-04T08:52:36.00Z", testTimeString)
|
||||
suite.Equal("2021-10-04T08:52:36.000Z", testTimeString)
|
||||
}
|
||||
|
||||
func TestTimeSuite(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user