Ticket #6359 (closed: fixed)
Possible bug in DateAndTime constructor
Reported by: | Russell Taylor | Owned by: | Russell Taylor |
---|---|---|---|
Priority: | minor | Milestone: | Release 2.6 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Michael Reuter |
Description
If you pass the string "2010-01-01" to the DateAndTime constructor (as WorkspaceCreationHelper.cpp does at line 480) it accepts it as a valid ISO8601 string, but on printing back the date you get "2010-Mar-25 18:01:01".
Change History
comment:2 Changed 8 years ago by Russell Taylor
Re #6359. Give a full ISO8601 string.
Avoids it being turned into a completely different date!
Changeset: a17116634a6285c7cd66c1c32b6b2bcbbb493256
comment:3 Changed 8 years ago by Nick Draper
- Milestone changed from Release 2.4 to Release 2.5
Moved at the code freeze for release 2.4
comment:5 Changed 7 years ago by Nick Draper
- Owner set to Russell Taylor
- Status changed from new to assigned
comment:7 Changed 7 years ago by Russell Taylor
- Status changed from accepted to verify
- Resolution set to fixed
With the boost version we're using on Windows at least, the DateAndTime constructor will throw an exception if passed a string just containing the date (see [138d4a5f]). To verify this, change back the fix I made to WorkspaceCreationHelper::CreateEventWorkspace above (now at line 486) and observe the failure of a test that uses it (e.g. CompressEvents). Obviously, you need to be using Windows to test this (and we will be relying on good test coverage to catch it elsewhere until the boost version catches up).
The commit above is already in master.
comment:8 Changed 7 years ago by Michael Reuter
- Status changed from verify to verifying
- Tester set to Michael Reuter
comment:9 Changed 7 years ago by Michael Reuter
- Status changed from verifying to closed
This looks to be working on Windows just fine.
comment:11 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7205
Re #6359. Give a full ISO8601 string.
Avoids it being turned into a completely different date!