NetBSD-Users archive

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

Re: question about strptime on NetBSD 6 stable



Christos Zoulas <christos%astron.com@localhost> wrote ..
> In article <1361323947.52794%da3m0n8t3r.com@localhost>,
> Waitman Gobble <uzimac%da3m0n8t3r.com@localhost> wrote:
> >
> >It seems like strptime is ignoring %z on NetBSD 6 stable? Or maybe i'm
> >doing it wrong.
> 
> mktime(3) uses the "local time" to convert struct tm * to time_t. This
> means that while strptime(3) takes into account the tzoffset and sets
> tm->tm_gmtoff correctly, this field is not taken into account by mktime(3)
> since doing so would violate the standard. Depending on the timezone you
> have set, you are going to see different results; perhaps this is why you
> think that the other OS is correct :-)
> 
> NetBSD provides extensions such as mktime_z() that control which timezone
> is used on a call by call basis, instead of relying on the environment.
> 
> christos


Thank you,
I will fix my code. "After" I hit send, I realized I probably should have said 
it was the number I was looking for, not necessarily the correct one!


-- 
Waitman Gobble
San Jose California USA



Home | Main Index | Thread Index | Old Index