code: plan9front

ref: 75d6267a5f788162d92e7a5ae126cd8b0770aa8a
dir: /sys/src/libc/9sys/tm2sec.c/

View raw version
#include <u.h>
#include <libc.h>

tm2sec(Tm *tm)
	Tm tt;

	tt = *tm;
	 * The zone offset should be calculated,
	 * but old code may not init tz member.
	 * nil it out so we don't access junk.
	 * while we're at it, old code probably
	 * leaves junk in nsec.
	tt.nsec = 0; = nil;
	return tmnorm(&tt);