So far it looks like boost::gregorian::date
only has day/month/year. I need to also store hour/minute/second. Can this object handle both? I'm having difficulty understanding how to represent all of this data.
Asked
Active
Viewed 1,179 times
4

void.pointer
- 24,859
- 31
- 132
- 243
1 Answers
3
No, this object cannot handle that (because then boost::gregorian::date
wouldn't be a ... date
).
If you need a datetime, use boost::posix_time::ptime
(which is a tuple of gregorian::date, time_duration
).
If you also need a timezone look at boost::local_time::local_date_time
or Boost Locale's date_time

sehe
- 374,641
- 47
- 450
- 633
-
1Thanks; I do find the objects to be rather confusing, so this helps. – void.pointer Jun 23 '16 at 13:30