mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
use time zone in time format for IC updates
This commit is contained in:
parent
ca533f7d5a
commit
d99b769159
2 changed files with 21 additions and 23 deletions
|
@ -106,7 +106,6 @@ var ICA = database.InfrastructureComponent{
|
||||||
State: "idle",
|
State: "idle",
|
||||||
Location: "k8s",
|
Location: "k8s",
|
||||||
Description: "A signal generator for testing purposes",
|
Description: "A signal generator for testing purposes",
|
||||||
//StateUpdateAt: time.Now().Format(time.RFC1123),
|
|
||||||
StartParameterScheme: postgres.Jsonb{propertiesA},
|
StartParameterScheme: postgres.Jsonb{propertiesA},
|
||||||
ManagedExternally: false,
|
ManagedExternally: false,
|
||||||
}
|
}
|
||||||
|
@ -121,7 +120,6 @@ var ICB = database.InfrastructureComponent{
|
||||||
State: "running",
|
State: "running",
|
||||||
Location: "ACS Laboratory",
|
Location: "ACS Laboratory",
|
||||||
Description: "This is a test description",
|
Description: "This is a test description",
|
||||||
//StateUpdateAt: time.Now().Format(time.RFC1123),
|
|
||||||
StartParameterScheme: postgres.Jsonb{propertiesB},
|
StartParameterScheme: postgres.Jsonb{propertiesB},
|
||||||
ManagedExternally: true,
|
ManagedExternally: true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ func (r *AddICRequest) createIC(receivedViaAMQP bool) (InfrastructureComponent,
|
||||||
s.State = "unknown"
|
s.State = "unknown"
|
||||||
}
|
}
|
||||||
// set last update to creation time of IC
|
// 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
|
return s, err
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ func (r *UpdateICRequest) updatedIC(oldIC InfrastructureComponent) Infrastructur
|
||||||
s.Description = r.InfrastructureComponent.Description
|
s.Description = r.InfrastructureComponent.Description
|
||||||
|
|
||||||
// set last update time
|
// set last update time
|
||||||
s.StateUpdateAt = time.Now().Format(time.RFC1123)
|
s.StateUpdateAt = time.Now().Format(time.RFC1123Z)
|
||||||
|
|
||||||
// only update props if not empty
|
// only update props if not empty
|
||||||
var emptyJson postgres.Jsonb
|
var emptyJson postgres.Jsonb
|
||||||
|
|
Loading…
Add table
Reference in a new issue