[haiku-3rdparty-dev] Re: Displaying the current time in a specific string

  • From: "Yashasvi A.C." <yashasviac@xxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Sat, 7 Nov 2009 13:30:48 +1300

On Sat, Nov 7, 2009 at 5:00 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:

> I guess you are misunderstanding that older post (or else it was just
> wrong).
> real_time_clock() and time(NULL) should give you identical results, and
> that is what you should feed into localtime().
> BTW in a multithreaded application, you should use localtime_r()
> instead, but don't forget to call tzset() then in main().
>
> Bye,
>    Axel.
>
>
>
Hi Axel,

So, real_time_clock() should give me the current time and I don't need to
add/subtract it to anything else?

Regards,
Yash

Other related posts: