Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fixed DeprovisionDate format #10100

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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