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

The Created property on a container should be a DateTime object #92

Closed
pcgeek86 opened this issue Jul 13, 2016 · 4 comments
Closed

The Created property on a container should be a DateTime object #92

pcgeek86 opened this issue Jul 13, 2016 · 4 comments

Comments

@pcgeek86
Copy link

Right now, the Created property on a container is a long. This should be converted to a System.DateTime.

https://github.com/Microsoft/Docker.DotNet/blob/44da8e6df3e52729d42a43c945a2e92aace071f7/Docker.DotNet/Models/ContainerListResponse.Generated.cs

Cheers,
Trevor Sullivan
Microsoft MVP: Cloud & Data Center Management
https://trevorsullivan.net
https://twitter.com/pcgeek86

@jstarks
Copy link
Collaborator

jstarks commented Jul 14, 2016

@jterry75 We're correctly performing the mapping from int64 to long here, but maybe we should add a special case for this one to map to DateTime (presumably the int64 is Unix time). What do you think?

@jterry75
Copy link
Contributor

Easy enough to do. We already do this in many other places. Just a miss in the autogen code. For example "ImagesListResponse.Created" is a properly converted Unix time -> DateTime. PR on its way.

jterry75 added a commit to jterry75/Docker.DotNet that referenced this issue Jul 14, 2016
Resolves: dotnet#92

Fixes a bug where container.Created was a long unix date time and converts
that to a C# System.DateTime object.
jterry75 added a commit to jterry75/Docker.DotNet that referenced this issue Jul 14, 2016
Resolves: dotnet#92

Fixes a bug where container.Created was a long unix date time and converts
that to a C# System.DateTime object.
jterry75 added a commit to jterry75/Docker.DotNet that referenced this issue Jul 14, 2016
Resolves: dotnet#92

Fixes a bug where container.Created was a long unix date time and converts
that to a C# System.DateTime object.
@jterry75 jterry75 reopened this Jul 14, 2016
@jterry75
Copy link
Contributor

There are a few more.

@pcgeek86
Copy link
Author

Thanks @jterry75 @jstarks -- the current code works surprisingly well. Keep it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants