add _der_gmtime, use and test it

This commit is contained in:
Love Hornquist Astrand
2010-09-29 13:32:39 -07:00
parent f454f45fbf
commit 5fc132d888
5 changed files with 55 additions and 9 deletions

View File

@@ -58,6 +58,15 @@ test_timegm(void)
if (t != -1)
ret += 1;
_der_gmtime(1159696980, &tm);
if (tm.tm_year != 106 ||
tm.tm_mon != 9 ||
tm.tm_mday != 1 ||
tm.tm_hour != 10 ||
tm.tm_min != 3 ||
tm.tm_sec != 0)
errx(1, "tmtime failes");
return ret;
}