Skip to content

Commit

Permalink
feat(userlog): use fixed deprovision date format
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <[email protected]>
  • Loading branch information
kobergj committed Sep 18, 2024
1 parent 4423fb2 commit 85670af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/format-deprovision-date.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Format deprovision date

The date in the deprovision message should apparently be RFC3339 formatted and not configurable.

https://github.com/owncloud/ocis/pull/10100
2 changes: 1 addition & 1 deletion services/userlog/pkg/service/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (c *Converter) ConvertGlobalEvent(typ string, data json.RawMessage) (OC10No
return OC10Notification{}, err
}

return c.deprovisionMessage(PlatformDeprovision, dd.DeprovisionDate.Format(dd.DeprovisionFormat))
return c.deprovisionMessage(PlatformDeprovision, dd.DeprovisionDate.Format(time.RFC3339))
}

}
Expand Down
1 change: 0 additions & 1 deletion services/userlog/pkg/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ func (ul *UserlogService) StoreGlobalEvent(ctx context.Context, typ string, data

date, err := time.Parse(format, dps)
if err != nil {
fmt.Println("", format, "\n", dps)
return fmt.Errorf("cannot parse time to format. time: '%s' format: '%s'", dps, format)
}

Expand Down

0 comments on commit 85670af

Please sign in to comment.