Copy the daemon/internal/timestamp package to internal client package

This change copies the daemon/internal/timestamp package (previously api/types/time) to an internal client package and updates the client usage for GetTimestamp functionality.

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This commit is contained in:
Austin Vazquez
2025-08-13 15:45:11 -05:00
parent 812aa46d81
commit aa80ad2572
12 changed files with 248 additions and 22 deletions

View File

@@ -8,7 +8,7 @@ import (
"time"
"github.com/moby/moby/api/types/container"
timetypes "github.com/moby/moby/api/types/time"
"github.com/moby/moby/client/internal/timestamp"
)
// ServiceLogs returns the logs generated by a service in an [io.ReadCloser].
@@ -29,7 +29,7 @@ func (cli *Client) ServiceLogs(ctx context.Context, serviceID string, options co
}
if options.Since != "" {
ts, err := timetypes.GetTimestamp(options.Since, time.Now())
ts, err := timestamp.GetTimestamp(options.Since, time.Now())
if err != nil {
return nil, fmt.Errorf(`invalid value for "since": %w`, err)
}