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

On Feb 19,  9:12pm, ("Waitman Gobble") wrote:
-- Subject: Re: question about strptime on NetBSD 6 stable

| After looking through the src I think I see what's going on... 
| The man page for mktime seems to read that it uses the TZ environment 
variable, however changing the TZ environment variable did not change the 
output of my sample test program.
| the source...
| The way mktime is defined, it is actually calling mktime_z and using the TZ 
set in the tm struct. So when I use strptime it's parsing the %Z, mktime is 
actually calculating the result using the offset provided in the tm structure. 

lclptr is a reference to the local timezone:

[9:22am] 2556>cc strp.c
[9:22am] 2557>./a.out
[9:22am] 2558>env TZ=UTC ./a.out 
[9:23am] 2559>env TZ=MET ./a.out
[9:23am] 2560>env TZ=EET ./a.out
[9:23am] 2561>


Home | Main Index | Thread Index | Old Index