[PLUG] Question on mktime() results
Galen Seitz
galens at seitzassoc.com
Tue Jan 26 04:57:57 UTC 2016
On 01/25/16 17:23, logical american wrote:
> To C geeks:
>
> Could someone who has freetime on their linux system compile the
> following C program and see if they can duplicate these results?
> I found a strange 422 second difference between the 2 times.
>
> ...snip...
galens at lion:~$ make mktime_test
cc mktime_test.c -o mktime_test
galens at lion:~$ ./mktime_test
first struct tm object dump: 1 7 12 18 10 -17 0 321 0 -28378 LMT
second struct tm object dump: 2 7 12 18 10 -17 0 321 0 -28800 PST
First time tick: -2717640001 Second time tick: -2717639578 Difference: -423 secs. Should be -1 seconds instead.
Is this discrepancy due to the 7 min 2 sec difference between PST and Local Mean Time (Solar Time) ?
galen
--
Galen Seitz
galens at seitzassoc.com
More information about the PLUG
mailing list