Lines Matching refs:stm
232 static void setallfields (lua_State *L, struct tm *stm) {
233 setfield(L, "year", stm->tm_year, 1900);
234 setfield(L, "month", stm->tm_mon, 1);
235 setfield(L, "day", stm->tm_mday, 0);
236 setfield(L, "hour", stm->tm_hour, 0);
237 setfield(L, "min", stm->tm_min, 0);
238 setfield(L, "sec", stm->tm_sec, 0);
239 setfield(L, "yday", stm->tm_yday, 1);
240 setfield(L, "wday", stm->tm_wday, 1);
241 setboolfield(L, "isdst", stm->tm_isdst);
309 struct tm tmr, *stm;
311 stm = l_gmtime(&t, &tmr);
315 stm = l_localtime(&t, &tmr);
316 if (stm == NULL) /* invalid date? */
321 setallfields(L, stm);
336 reslen = strftime(buff, SIZETIMEFMT, cc, stm);