lab3 done

This commit is contained in:
Khakimov Dmitrij
2026-10-28 21:48:04 +03:00
parent ec540a1a72
commit a7bedda183
81 changed files with 4202 additions and 10 deletions
+11
View File
@@ -0,0 +1,11 @@
package dto
import "time"
// Timestamp preserves PostgreSQL microseconds and is readable by Python 3.9 clients.
// time.Time's variable-length fractional part is not supported by those clients.
type Timestamp time.Time
func (t Timestamp) MarshalJSON() ([]byte, error) {
return []byte(`"` + time.Time(t).UTC().Format("2006-01-02T15:04:05.000000Z") + `"`), nil
}