diff options
Diffstat (limited to 'routers/api/packages/composer')
-rw-r--r-- | routers/api/packages/composer/api.go | 2 | ||||
-rw-r--r-- | routers/api/packages/composer/composer.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/packages/composer/api.go b/routers/api/packages/composer/api.go index 45bb7eae1c..ed52d16513 100644 --- a/routers/api/packages/composer/api.go +++ b/routers/api/packages/composer/api.go @@ -99,7 +99,7 @@ func createPackageMetadataResponse(registryURL string, pds []*packages_model.Pac Name: pd.Package.Name, Version: pd.Version.Version, Type: packageType, - Created: time.Unix(int64(pd.Version.CreatedUnix), 0), + Created: pd.Version.CreatedUnix.AsLocalTime(), Metadata: pd.Metadata.(*composer_module.Metadata), Dist: Dist{ Type: "zip", diff --git a/routers/api/packages/composer/composer.go b/routers/api/packages/composer/composer.go index 81cef39f1c..86ef7cbd9a 100644 --- a/routers/api/packages/composer/composer.go +++ b/routers/api/packages/composer/composer.go @@ -184,7 +184,7 @@ func DownloadPackageFile(ctx *context.Context) { } defer s.Close() - ctx.ServeStream(s, pf.Name) + ctx.ServeContent(pf.Name, s, pf.CreatedUnix.AsLocalTime()) } // UploadPackage creates a new package |