lab 3 done

This commit is contained in:
Khakimov Dmitrij
2026-10-20 20:46:51 +03:00
parent 0ab3a341aa
commit f9015df5d1
113 changed files with 6763 additions and 49 deletions
+15
View File
@@ -0,0 +1,15 @@
package dto
import (
"encoding/json"
"testing"
"time"
)
func TestTimestampFixedMicroseconds(t *testing.T) {
timestamp := Timestamp(time.Date(2026, 1, 2, 3, 4, 5, 123400000, time.UTC))
encoded, err := json.Marshal(timestamp)
if err != nil || string(encoded) != `"2026-01-02T03:04:05.123400Z"` {
t.Fatalf("timestamp=%s err=%v", encoded, err)
}
}