Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2005-07-28 15:09:31


On Thu, 28 Jul 2005 13:51:06 -0600, Sean Rohead wrote
> Just as a follow up to this, let me describe what I'm trying to do.
> I would like the current time in UTC with microsecond resolution.
> Well, the microsec_clock class only provides a local_time() method
> (unlike the second_clock class which also provides universal_time()
> ). So, I need to convert the result of local_time() into UTC but I
> can't since the only class which knows the local timezone is
> c_local_adjustor and it does not provide local_to_utc() (only
> utc_to_local()).
>
> If there is a better way to get the current time in UTC with microsecond
> resolution, I'd be happy to use it instead.

That was an omission that is fixed in the current CVS. So in 1.33, which
should be shipping in the next few days, you can just call universal_time().

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net