# Date-Time Build-Compiler Information

Overall Index -- Gregorian Index -- Posix Time Index

Overview -- Compilation Options -- Compiler/Portability Notes -- Directory Structure -- Required Boost Libraries

## Overview

The library has several functions that require the creation of a library file. The Jamfile in the build directory (BOOST_ROOT/libs/date_time/build) will produce the libboost_date_time library that contains these functions. The library is compiled into both static and dynamic (dll) forms. Note that the static library is the prefered form as some compilers have spurious regression test errors using the dynamic library. See the regression test logs at sourceforge for more details.

## Compilation Options

By default the posix_time system uses a 64 bit integer and a 32 bit integer internally to provide nano-second level resolutions -- 96 bits for each time value. As an alternative, a single 64 bit integer can be used to provide a microsecond level resolution. This alternative implementation may provide better performance and more compact memory usage for many applications that do not require nano-second resolutions.

The variable BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG, as defined in build/Jamfile, selects between these options. To select the 64 bit integer implementation simply remove this define from the Jamfile.

## Compiler/Portability Notes

The Boost Date-Time library has been built and tested with many compilers on many platforms. In general, the more standard compliant the compiler and library combination the more likely the library will be fully supported. However, some compilers and standard libraries have issues. While some of these issues can be worked around, others are difficult to work around. The following compilers fully support all aspects of the library:

- GCC 3.x on Linux
- GCC 3.1 (cygwin) for Windows
- GCC 3.3 on Mac
- Borland 5.6.4 for Windows
- MSVC 7.1 on Windows
- MIPSpro 7.4 on SGI
- VisualAge 6.0 on IBM AIX

In particular, a lack of support for standard locales limits the ability of the library to support iostream based input and output. For these compilers a set of more limited string based input-output is provided. In addition, some compilers have regression test failures with the dll form of the library or other issues that may prevent using some aspects of the library. Some compilers/standard libraries with known limitations include:

- GCC 2.9x on Linux
- Borland 5.1.1 on Windows
- Intel 8.00 on Windows
- Metrowerks 8.3 on Windows
- MSVC 6 SP5 on Windows
- MSVC 7 on Windows

A great resource for the details on this subject are the boost regression test logs at sourceforge .

## Directory Structure

The date_time directory structure has been changed for boost submission.

The directory tree has the following structure:

      /boost/date_time                    -- common headers and template code
      /boost/date_time/gregoran           -- gregorian calendar system header files
      /boost/date_time/posix_time         -- posix time system headers
      /libs/date_time/build               -- build files and output directory
      /libs/date_time/test                -- test battery for generic code
      /libs/date_time/test/gregorian      -- test battery for the gregorian system
      /libs/date_time/test/posix_time     -- test battery for the posix_time system
      /libs/date_time/examples/posix_time -- time example programs
      /libs/date_time/examples/gregorian  -- nifty example programs
      /libs/date_time/src/gregorian       -- cpp files for libboost_date_time
      /libs/date_time/src/posix_time      -- empty (one file, but no source code...)

## Required Boost Libraries

The library depends on the following boost libraries:

- config
- integer(cstdint)
- operators
- lexical_cast
- tokenizer