Opened 10 years ago
Closed 5 years ago
#8450 closed Bugs (fixed)
Missing casts in c_local_time_adjustor.hpp lead to year 2038 problem
Reported by: | Owned by: | James E. King, III | |
---|---|---|---|
Milestone: | Boost 1.67.0 | Component: | date_time |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The duration_rep_type, hour_type and min_type values are not cast to std::time_t, so if they are 32-bit and std::time_t is 64-bit, std::time_t t2 becomes negative for dates after year 2038 and c_time::localtime throws an exception.
With the casts to std::time_t in the attached patch, no exception is thrown.
Attachments (1)
Change History (3)
by , 10 years ago
Attachment: | c_local_time_adjustor.hpp.patch added |
---|
comment:1 by , 5 years ago
Milestone: | To Be Determined → Boost 1.67.0 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
This was resolved in the fix for #11142:
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix merged to master; resolved.
Note:
See TracTickets
for help on using tickets.
Patch that fixes the problem