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

last modified double values not set correctly... #94

Closed
cedral opened this issue Feb 1, 2016 · 3 comments
Closed

last modified double values not set correctly... #94

cedral opened this issue Feb 1, 2016 · 3 comments

Comments

@cedral
Copy link

cedral commented Feb 1, 2016

Not sure why these fields are double because the both come down as strings. last modifed comes in 2 ways. Either in XML response (ie: ListObjects) or in the last-modified header value for Head* requests

These string responses appear to come in 2 formats...
yyyy-mm-ddThh:mm::ss.000000Z for xml ( this one produces the year in the double field.)
and
Fri, 29 Jan 2016 hh::mm::ss GMT for header. (this one produces 0 in the double field.)

I needed this to work so I wrote 2 functions in StringUtils called

StringHeaderToDoubleDate
and
StringXmlToDoubleDate

and parsed and imported the date time stamp into struct tm and called gmtime (or _mkgmtime on windows) to get a time_t and cast that to the double. These gives me a usable value from outside the library but I am not sure it was the one you were looking for. Would you like me to issue a pull request?

@JonathanHenson
Copy link
Contributor

What service is this bug on? S3?

They are double because that is the default for date stamps, but some services specify a datestamp, but actually use something like ISO or millis since epoch. When I find them, I have to go and provide some overrides to the generator.

@cedral
Copy link
Author

cedral commented Feb 4, 2016

Yes, they are all in S3. HeadObject was calling strod on the last-modified header which is a string representation of a date.
ListObjects was calling strtod on a node in the Xml response documents named LastModified which was a different string representation.

On Feb 3, 2016, at 5:40 PM, Jonathan M. Henson notifications@github.com wrote:

What service is this bug on? S3?

They are double because that is the default for date stamps, but some services specify a datestamp, but actually use something like ISO or millis since epoch. When I find them, I have to go and provide some overrides to the generator.


Reply to this email directly or view it on GitHub #94 (comment).

Joseph Southwell
joseph@southwell.org
The past is history,
The future's a mystery,
The present's a gift.

@JonathanHenson
Copy link
Contributor

I've just pushed a major update to the way we handle date timestamps. See if this resolves your issue. Reopen if you have further issues.

krzysztof-trzepla pushed a commit to krzysztof-trzepla/aws-sdk-cpp that referenced this issue May 21, 2016
…ent-logs-as-artifact-at-bamboo to develop

# By Jakub Kudzia
# Via Jakub Kudzia
* commit 'fd194d2fd54bec4cc33842630e9a0d72d8523296':
  VFS- 1641 change permissions  of log files in client and appmock in bash script inside docker
  VFS- 1641 change ownership of log files
  VFS- 1641 add logdir as argument to client_up
cobookman pushed a commit to cobookman/aws-sdk-cpp that referenced this issue Jan 17, 2022
* Updated dependencies to latest, fixed cmake template files.

* Don't need the finder module updates anymore.

* Update aws-c-io for new libcrypto dependency mess, and pull in some minor bug fixes from s2n.

* Make sure tests don't get built accidentally this time.
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

2 participants