fix: ftime now set to now() if not received in backend
This commit is contained in:
parent
4102aa20d2
commit
541d0fce27
1 changed files with 4 additions and 1 deletions
|
|
@ -71,7 +71,10 @@ func sqlDate2oapi(p_date pgtype.Timestamptz) *time.Time {
|
||||||
|
|
||||||
func oapiDate2sql(t *time.Time) pgtype.Timestamptz {
|
func oapiDate2sql(t *time.Time) pgtype.Timestamptz {
|
||||||
if t == nil {
|
if t == nil {
|
||||||
return pgtype.Timestamptz{Valid: false}
|
return pgtype.Timestamptz{
|
||||||
|
Time: time.Now(),
|
||||||
|
Valid: true,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return pgtype.Timestamptz{
|
return pgtype.Timestamptz{
|
||||||
Time: *t,
|
Time: *t,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue