Updated deps, go.19 migration, nginx template work

This commit is contained in:
Jamie Curnow committed 2022-11-08 10:03:45 +10:00
1 parent 8d37f5df8d
commit c00b690ed3
23 files changed
+375 -376

No files matched your search

@@ -52,3 +52,21 @@ func (d NullableDBDate) MarshalJSON() ([]byte, error) {
return json.Marshal(d.Time.Unix())
}
// AsInt64 will attempt to return a unixtime
func (d NullableDBDate) AsInt64() int64 {
if d.Time == nil || d.Time.IsZero() {
return 0
}
return d.Time.Unix()
}
// AsString returns date as a string
func (d NullableDBDate) AsString() string {
if d.Time == nil || d.Time.IsZero() {
return ""
}
return d.Time.String()
}