init(app) moved app code from Lab1

This commit is contained in:
imadev
2026-10-21 16:42:14 +03:00
parent 65003b6119
commit 1db3953226
22 changed files with 1297 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
package common
import (
"encoding/json"
"time"
)
type RFCFormTime time.Time
func (t RFCFormTime) MarshalJSON() ([]byte, error) {
ftime := time.Time(t).UTC().Format(time.RFC3339)
return json.Marshal(ftime)
}
func NowUTC() RFCFormTime {
return RFCFormTime(time.Now().UTC().Truncate(time.Second))
}