use time zone in time format for IC updates

This commit is contained in:
Sonja Happ 2021-01-25 14:41:08 +01:00
parent ca533f7d5a
commit d99b769159
2 changed files with 21 additions and 23 deletions

View file

@ -106,7 +106,6 @@ var ICA = database.InfrastructureComponent{
State: "idle",
Location: "k8s",
Description: "A signal generator for testing purposes",
//StateUpdateAt: time.Now().Format(time.RFC1123),
StartParameterScheme: postgres.Jsonb{propertiesA},
ManagedExternally: false,
}
@ -121,7 +120,6 @@ var ICB = database.InfrastructureComponent{
State: "running",
Location: "ACS Laboratory",
Description: "This is a test description",
//StateUpdateAt: time.Now().Format(time.RFC1123),
StartParameterScheme: postgres.Jsonb{propertiesB},
ManagedExternally: true,
}

View file

@ -143,7 +143,7 @@ func (r *AddICRequest) createIC(receivedViaAMQP bool) (InfrastructureComponent,
s.State = "unknown"
}
// set last update to creation time of IC
s.StateUpdateAt = time.Now().Format(time.RFC1123)
s.StateUpdateAt = time.Now().Format(time.RFC1123Z)
return s, err
}
@ -175,7 +175,7 @@ func (r *UpdateICRequest) updatedIC(oldIC InfrastructureComponent) Infrastructur
s.Description = r.InfrastructureComponent.Description
// set last update time
s.StateUpdateAt = time.Now().Format(time.RFC1123)
s.StateUpdateAt = time.Now().Format(time.RFC1123Z)
// only update props if not empty
var emptyJson postgres.Jsonb