Skip to content

Commit 72a840e

Browse files
authored
Merge pull request #534 from jlbutler/image-spec-517
specs-go: Image.Created uses a string type
2 parents ae31f7f + ac50136 commit 72a840e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

specs-go/v1/config.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
package v1
1616

17+
import "time"
18+
1719
// ImageConfig defines the execution parameters which should be used as a base when running a container using an image.
1820
type ImageConfig struct {
1921
// User defines the username or UID which the process in the container should run as.
@@ -52,8 +54,8 @@ type RootFS struct {
5254

5355
// History describes the history of a layer.
5456
type History struct {
55-
// Created is the creation time.
56-
Created string `json:"created,omitempty"`
57+
// Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6.
58+
Created time.Time `json:"created,omitempty"`
5759

5860
// CreatedBy is the command which created the layer.
5961
CreatedBy string `json:"created_by,omitempty"`
@@ -72,7 +74,7 @@ type History struct {
7274
// This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON.
7375
type Image struct {
7476
// Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6.
75-
Created string `json:"created,omitempty"`
77+
Created time.Time `json:"created,omitempty"`
7678

7779
// Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image.
7880
Author string `json:"author,omitempty"`

0 commit comments

Comments
 (0)