[dateTime] construting a date with time

Hi: I'm currently doing some work with the boost date time library. Can the boost date class be constructed with a time, or do I need a separate time variable as well? If so, should I use a local time, or posix time, given that the time has already been converted from utc to the users timezone. Any help appreciated. Regards Sean.

Sean Farrow <sean.farrow <at> seanfarrow.co.uk> writes:
Can the boost date class be constructed with a time, or do I need a separate time variable as well? If so, should I use a local time, or posix time, given that the time has already been converted from utc to the users timezone.
boost::gregorian::date does not have "time" component in it. However boost::posix::time and local_date_time do have "date" member - may be it is what you are looking for? Depending on what time type (posix or local) you are using you might get a shift in the date due to UTC.
participants (2)
-
archie14
-
Sean Farrow