Modify

Opened 8 years ago

Closed 8 years ago

#3308 closed Bugs (fixed)

gregorian does not use 32 bit int on 64 bit system

Reported by: Andre Vehreschild <andre.vehreschild@…> Owned by: az_sw_dude
Milestone: Boost 1.40.0 Component: date_time
Version: Boost 1.39.0 Severity: Showstopper
Keywords: date_time gregorian date 64bit-issue Cc:

Description

The gregorian date datatype is supposed to use a 32-bit integer for storing the date information. At least this is said so in the documentation. Unfortunately the implementation uses "unsigned long" which results in a 64-bit value on 64-bit systems.

I am able to propose attached patch. Please comment and correct!

Attachments (1)

greg_calender_32bit.patch (1.2 KB) - added by Andre Vehreschild <andre.vehreschild@…> 8 years ago.
Proposed patch using boost::integer.hpp

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Andre Vehreschild <andre.vehreschild@…>

Proposed patch using boost::integer.hpp

comment:1 Changed 8 years ago by andysem

(In [56338]) Refs #3308. Changed the internal type of the gregorian dates to 32 bit integer.

comment:2 Changed 8 years ago by andysem

(In [56372]) Refs #3308. Fixed calculation of difference between dates on 64 bit platforms.

comment:3 Changed 8 years ago by andysem

  • Resolution set to fixed
  • Status changed from new to closed

(In [56456]) Fixes #3308. Also added some missing includes.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain az_sw_dude.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.