monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

time offsets


From: Rory Toma
Subject: time offsets
Date: 13 Aug 2002 14:07:03 -0700

In util.c I noticed that following code:

<   timezone_h= -(timezone/3600)+daylight;
<   timezone_m= abs(timezone/60)%60;

Now, this wouldn't compile out of the box on FreeBSD, so I looked at
some man pages.

Isn't something like:

>   tm_now = localtime(&now);
> 
>   timezone_h = -(tm_now->tm_gmtoff/3600);
>   timezone_m = abs(tm_now->tm_gmtoff/60)%60;

more portable?

-- 
Rory Toma               address@hidden
VP of Run Level 5       http://www.trs80.net
Digeo Digital           http://www.digeo.com

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]