Ticket #3308 (closed Bugs: fixed)

Opened 8 years ago

Last modified 8 years ago

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:


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!


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

Change History

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

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

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


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

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

Note: See TracTickets for help on using tickets.