rpmmd: Fix the format of BuildTime to match the weldr API
The format of the BuildTime returned by /projects/list and /modules/list does not include the 'Z' at the end. This fixed the format and adjusts the tests.
This commit is contained in:
parent
ce6dc53a12
commit
5ac3cb3f46
2 changed files with 10 additions and 9 deletions
|
|
@ -37,9 +37,10 @@ type Package struct {
|
|||
}
|
||||
|
||||
func (pkg Package) ToPackageBuild() PackageBuild {
|
||||
// Convert the time to the API time format
|
||||
return PackageBuild{
|
||||
Arch: pkg.Arch,
|
||||
BuildTime: pkg.BuildTime,
|
||||
BuildTime: pkg.BuildTime.Format("2006-01-02T15:04:05"),
|
||||
Epoch: pkg.Epoch,
|
||||
Release: pkg.Release,
|
||||
Source: PackageSource{
|
||||
|
|
@ -79,7 +80,7 @@ type PackageSource struct {
|
|||
|
||||
type PackageBuild struct {
|
||||
Arch string `json:"arch"`
|
||||
BuildTime time.Time `json:"build_time"`
|
||||
BuildTime string `json:"build_time"`
|
||||
Epoch uint `json:"epoch"`
|
||||
Release string `json:"release"`
|
||||
Source PackageSource `json:"source"`
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue