Re: gettimeofday() seems to return local time
Re: gettimeofday() seems to return local time
- Subject: Re: gettimeofday() seems to return local time
- From: email@hidden
- Date: Thu, 2 Dec 2004 13:09:17 +0100
On Wed, Dec 01, 2004 at 03:39:14PM -0800, Justin Walker wrote:
>
> On Dec 1, 2004, at 14:57, Michael Rubinstein wrote:
>
> >I'm using gettimeofday(), on OS X 10.3.6, to get the time resolution I
> >need (milliseconds).
> >
> >If I'm reading the documentation right, I should be getting time in
> >UTC. However, I'm getting local time.
>
> As I read the man page, you should get the local time in *tp, and the
> offset from UTC in *tzp.
>
> >Should gettimeofday() return local time?
>
> Yup.
Hm, my reading of the Solaris, Linux and Mac OS X man pages is that the
time returned should indeed be UTC ... the former two explicitly
mention UTC, the Mac OS X page speaks of "current Greenwich time", which
I would interpret as "old" UTC.
...?
Regards, Colin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden