Home
last modified time | relevance | path

Searched refs:tm (Results 1 – 25 of 310) sorted by relevance

12345678910>>...13

/illumos-gate/usr/src/contrib/ast/src/lib/libast/tm/
H A Dtmfix.c58 …if (w = !tm->tm_sec && !tm->tm_min && !tm->tm_mday && !tm->tm_year && !tm->tm_yday && !tm->tm_isds… in tmfix()
110 tm->tm_year += tm->tm_mon / 12; in tmfix()
118 tm->tm_year += tm->tm_mon / 12; in tmfix()
119 tm->tm_mon = (-tm->tm_mon) % 12; in tmfix()
125 tm->tm_mday += 365 + LEAP(tm); in tmfix()
129 tm->tm_mday -= 365 + LEAP(tm); in tmfix()
139 tm->tm_mday += DAYS(tm); in tmfix()
141 while (tm->tm_mday > (n = DAYS(tm))) in tmfix()
160 if ((tm->tm_mday += w) > DAYS(tm)) in tmfix()
164 tm->tm_yday = tm_data.sum[tm->tm_mon] + (tm->tm_mon > 1 && LEAP(tm)) + tm->tm_mday - 1; in tmfix()
[all …]
H A Dtmxtime.c54 struct tm* tl; in tmxtime()
58 ts = *tm; in tmxtime()
59 to = tm; in tmxtime()
60 tm = &ts; in tmxtime()
62 tmfix(tm); in tmxtime()
63 y = tm->tm_year; in tmxtime()
75 t += tm->tm_hour; in tmxtime()
77 t += tm->tm_min; in tmxtime()
94 tm->tm_year = tmequiv(tm) - 1900; in tmxtime()
111 tm->tm_year = tmequiv(tm) - 1900; in tmxtime()
[all …]
H A Dtmxdate.c638 tm = tmxtm(tm, fix, tm->tm_zone); in tmxdate()
656 tm = tmxtm(tm, tt, tm->tm_zone); in tmxdate()
677 tm = tmxtm(tm, tmxtime(tm, zone), tm->tm_zone); in tmxdate()
1399 tm->tm_mday = tm_data.days[tm->tm_mon] + (tm->tm_mon == 1 && tmisleapyear(tm->tm_year)); in tmxdate()
1408 tm = tmxtm(tm, tmxtime(tm, zone), tm->tm_zone); in tmxdate()
1441 tm = tmxtm(tm, tmxtime(tm, zone), tm->tm_zone); in tmxdate()
1711 tm = tmxtm(tm, tmxtime(tm, zone), tm->tm_zone); in tmxdate()
1717 …for (n = tm_data.days[tm->tm_mon] + (tm->tm_mon == 1 && tmisleapyear(tm->tm_year)); (tm->tm_mday +… in tmxdate()
1722 tm->tm_mday = tm_data.days[tm->tm_mon] + (tm->tm_mon == 1 && tmisleapyear(tm->tm_year)); in tmxdate()
1726tm->tm_mday = (set & FINAL) ? (tm_data.days[tm->tm_mon] + (tm->tm_mon == 1 && tmisleapyear(tm->tm_… in tmxdate()
[all …]
H A Dtmxmake.c86 tm->tm_min = n % 60; in tmxtm()
93 tm->tm_min = x % 60; in tmxtm()
100 n = tm->tm_year - 1; in tmxtm()
102 tm->tm_mon = 0; in tmxtm()
105 tmfix(tm); in tmxtm()
107 tm->tm_isdst = 0; in tmxtm()
110 if ((y = tmequiv(tm) - 1900) == tm->tm_year) in tmxtm()
116 te = *tm; in tmxtm()
122 tm->tm_min -= o / 60 + (tm->tm_isdst ? tm->tm_zone->dst : 0); in tmxtm()
123 tmfix(tm); in tmxtm()
[all …]
H A Dtmxfmt.c116 Tm_t* tm; in tmxfmt() local
126 tm = tmxtm(&ts, t, NiL); in tmxfmt()
282 n = tm->tm_year + 1900; in tmxfmt()
283 if (tm->tm_yday < 7) in tmxfmt()
452 tm = tmxtm(tm, t, (flags & TM_UTC) ? &tm_data.zone[2] : tm->tm_zone); in tmxfmt()
461 tm = tmxtm(tm, t, (flags & TM_UTC) ? &tm_data.zone[2] : tm->tm_zone); in tmxfmt()
588 tm = tmxtm(tm, tmxtime(tm, tm->tm_zone->west + (tm->tm_isdst ? tm->tm_zone->dst : 0)), zp); in tmxfmt()
598 tm = tmxtm(tm, tmxtime(tm, tm->tm_zone->west + (tm->tm_isdst ? tm->tm_zone->dst : 0)), zp); in tmxfmt()
601 …(flags & TM_UTC) ? tm_info.format[TM_UT] : tm->tm_isdst && tm->tm_zone->daylight ? tm->tm_zone->da… in tmxfmt()
670 tm = tmxtm(tm, t, (flags & TM_UTC) ? &tm_data.zone[2] : tm->tm_zone); in tmxfmt()
[all …]
H A Dtmweek.c61 if ((day = tm->tm_wday - tm->tm_yday % 7) < 0) in tmweek()
68 else if (week == 53 && (tm->tm_wday + (31 - tm->tm_mday)) < 4) in tmweek()
75 tm->tm_mon = 0; in tmweek()
76 tm->tm_mday = 1; in tmweek()
77 tmfix(tm); in tmweek()
78 d = tm->tm_wday; in tmweek()
80 tmfix(tm); in tmweek()
81 if (d = tm->tm_wday - day) in tmweek()
83 tm->tm_mday -= d; in tmweek()
84 tmfix(tm); in tmweek()
[all …]
H A Dtmxscan.c85 tm->tm_year++; in gen()
102 tm->tm_mon = 0; in gen()
111 tm->tm_mday++; in gen()
139 tm = tmxtm(tm, t, tm->tm_zone); in gen()
140 tm->tm_mday += set->yday - tm->tm_yday; in gen()
145 tm = tmxtm(tm, t, tm->tm_zone); in gen()
148 tm->tm_mday += n; in gen()
157 tm = tmxtm(tm, t, tm->tm_zone); in gen()
174 register Tm_t* tm; in scan() local
325 tm = tmxtm(tm, tmxsns(x, 0), tm->tm_zone); in scan()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/comp/
H A Dstrftime.c63 if (tm->tm_sec < 0 || tm->tm_sec > 60 ||
64 tm->tm_min < 0 || tm->tm_min > 59 ||
65 tm->tm_hour < 0 || tm->tm_hour > 23 ||
66 tm->tm_wday < 0 || tm->tm_wday > 6 ||
67 tm->tm_mday < 1 || tm->tm_mday > 31 ||
68 tm->tm_mon < 0 || tm->tm_mon > 11 ||
71 if (tm->tm_sec >= 0 && tm->tm_sec <= 60)
73 if (tm->tm_min >= 0 && tm->tm_min <= 59)
75 if (tm->tm_hour >= 0 && tm->tm_hour <= 23)
77 if (tm->tm_wday >= 0 && tm->tm_wday <= 6)
[all …]
H A Dstrptime.c53 Tm_t tm;
55 memset(&tm, 0, sizeof(tm));
56 tm.tm_sec = ts->tm_sec;
57 tm.tm_min = ts->tm_min;
58 tm.tm_hour = ts->tm_hour;
59 tm.tm_mday = ts->tm_mday;
60 tm.tm_mon = ts->tm_mon;
61 tm.tm_year = ts->tm_year;
70 ts->tm_sec = tm.tm_sec;
71 ts->tm_min = tm.tm_min;
[all …]
H A Dmktime.c50 mktime(struct tm* ts)
53 Tm_t tm;
55 tm.tm_sec = ts->tm_sec;
56 tm.tm_min = ts->tm_min;
57 tm.tm_hour = ts->tm_hour;
58 tm.tm_mday = ts->tm_mday;
59 tm.tm_mon = ts->tm_mon;
60 tm.tm_year = ts->tm_year;
65 ts->tm_sec = tm.tm_sec;
66 ts->tm_min = tm.tm_min;
[all …]
H A Dgetdate.c53 extern struct tm*
59 Tm_t* tm;
61 static struct tm ts;
70 tm = tmmake(&t);
71 ts.tm_sec = tm->tm_sec;
72 ts.tm_min = tm->tm_min;
73 ts.tm_hour = tm->tm_hour;
74 ts.tm_mday = tm->tm_mday;
75 ts.tm_mon = tm->tm_mon;
76 ts.tm_year = tm->tm_year;
[all …]
/illumos-gate/usr/src/cmd/localedef/
H A Dtime.c31 struct lc_time tm; variable
36 (void) memset(&tm, 0, sizeof (tm)); in init_time()
52 tm.c_fmt = str; in add_time_str()
55 tm.x_fmt = str; in add_time_str()
58 tm.X_fmt = str; in add_time_str()
61 tm.ampm_fmt = str; in add_time_str()
122 tm.am = str; in add_time_list()
124 tm.pm = str; in add_time_list()
207 tm.am = NULL; in reset_time_list()
209 tm.pm = NULL; in reset_time_list()
[all …]
/illumos-gate/usr/src/lib/libc/port/locale/
H A Dstrptime.c55 struct tm *_RESTRICT_KYWD tm, int *_RESTRICT_KYWD flagsp, in __strptime() argument
212 tm->tm_min = i; in __strptime()
216 tm->tm_sec = i; in __strptime()
248 tm->tm_hour = i; in __strptime()
293 tm->tm_wday = i; in __strptime()
386 tm->tm_mon = i; in __strptime()
523 struct tm *_RESTRICT_KYWD tm) in strptime() argument
527 (void) memset(tm, 0, sizeof (*tm)); in strptime()
538 const char *_RESTRICT_KYWD fmt, struct tm *_RESTRICT_KYWD tm) in __strptime_dontzero() argument
557 struct tm *_RESTRICT_KYWD tm, locale_t loc) in strptime_l() argument
[all …]
H A Dgetdate.c64 struct tm *
196 struct tm tm; in getdate() local
198 (void) memset(&tm, 0, sizeof (struct tm)); in getdate()
200 tm.tm_mon = rtm.tm_mon; in getdate()
201 tm.tm_mday = 1; in getdate()
202 (void) mktime(&tm); in getdate()
260 struct tm tm; in getdate() local
262 (void) memset(&tm, 0, sizeof (struct tm)); in getdate()
264 tm.tm_mon = rtm.tm_mon; in getdate()
265 tm.tm_mday = 1; in getdate()
[all …]
/illumos-gate/usr/src/uts/common/fs/tmpfs/
H A Dtmp_vfsops.c233 struct tmount *tm = NULL; in tmp_mount() local
309 tm->tm_anonmax = anonmax; in tmp_mount()
337 tm->tm_vfsp = vfsp; in tmp_mount()
338 tm->tm_anonmax = anonmax; in tmp_mount()
393 tm->tm_rootnode = tp; in tmp_mount()
438 tnp = tm->tm_rootnode; in tmp_unmount()
489 ASSERT(tm->tm_rootnode); in tmp_unmount()
506 while ((tnp = tm->tm_rootnode->tn_back) != tm->tm_rootnode) { in tmp_unmount()
536 ASSERT(tm->tm_mntpath); in tmp_unmount()
538 tmp_memfree(tm->tm_mntpath, strlen(tm->tm_mntpath) + 1); in tmp_unmount()
[all …]
H A Dtmp_tnode.c61 struct tmount *tm, in tmp_resv() argument
80 zone = tm->tm_vfsp->vfs_zone; in tmp_resv()
81 if (pagecreate && ((tm->tm_anonmem + pages > tm->tm_anonmax) || in tmp_resv()
92 tm->tm_anonmem += pages; in tmp_resv()
93 mutex_exit(&tm->tm_contents); in tmp_resv()
109 struct tmount *tm, in tmp_unresv() argument
120 mutex_exit(&tm->tm_contents); in tmp_unresv()
184 t->tn_fsid = tm->tm_dev; in tmpnode_init()
198 vp->v_vfsp = tm->tm_vfsp; in tmpnode_init()
209 t->tn_gen = tm->tm_gen++; in tmpnode_init()
[all …]
/illumos-gate/usr/src/cmd/touch/
H A Dtouch.c282 struct tm tm; in parse_datetime() local
326 (void) memset(&tm, 0, sizeof (struct tm)); in parse_datetime()
342 if (tm.tm_isdst) in parse_datetime()
394 struct tm tm; in parse_time() local
407 (void) memset(&tm, 0, sizeof (struct tm)); in parse_time()
421 tm.tm_year += 100; in parse_time()
441 if (tm.tm_isdst) in parse_time()
452 struct tm tm; in parse_timespec() local
459 (void) memset(&tm, 0, sizeof (struct tm)); in parse_timespec()
467 tm.tm_year += 100; in parse_timespec()
[all …]
/illumos-gate/usr/src/cmd/smbsrv/test-msgbuf/
H A Dtest_misc.c41 struct tm
45 smb_timegm(struct tm *tm);
47 struct tm { struct
124 struct tm atm; in smb_time_dos_to_unix()
144 struct tm atm; in smb_time_unix_to_dos()
191 struct tm *
263 smb_timegm(struct tm *tm) in smb_timegm() argument
271 if (tm == 0) in smb_timegm()
294 tsec += tm->tm_sec; in smb_timegm()
298 tm->tm_isdst = 0; in smb_timegm()
[all …]
/illumos-gate/usr/src/boot/include/
H A Dtime.h125 struct tm { struct
144 char *asctime(const struct tm *);
149 struct tm *gmtime(const time_t *);
150 struct tm *localtime(const time_t *);
151 time_t mktime(struct tm *);
153 const struct tm * __restrict);
183 struct tm *gmtime_r(const time_t *, struct tm *);
184 struct tm *localtime_r(const time_t *, struct tm *);
189 struct tm * __restrict);
195 time_t timelocal(struct tm * const);
[all …]
/illumos-gate/usr/src/cmd/zdump/
H A Dzdump.c100 static long delta(struct tm *, struct tm *);
112 static struct tm *
120 struct tm tm; local
123 tm = *tmp;
194 struct tm tm; local
293 tm = *tmp;
322 tm = newtm;
432 struct tm tm; local
453 tm = *tmp;
459 lotm = tm;
[all …]
/illumos-gate/usr/src/head/
H A Dtime.h58 using std::tm;
87 extern struct tm *gmtime_r(const time_t *_RESTRICT_KYWD,
88 struct tm *_RESTRICT_KYWD);
89 extern struct tm *localtime_r(const time_t *_RESTRICT_KYWD,
90 struct tm *_RESTRICT_KYWD);
106 struct tm *_RESTRICT_KYWD);
185 extern time_t timegm(struct tm *);
187 extern int ascftime(char *, const char *, const struct tm *);
193 extern struct tm *getdate(const char *);
252 extern char *__posix_asctime_r(const struct tm *_RESTRICT_KYWD,
[all …]
/illumos-gate/usr/src/cmd/backup/lib/
H A Dgetdate.y581 struct tm *tm; local
597 struct tm *tm; local
604 Month = 12 * tm->tm_year + tm->tm_mon + RelMonth;
609 (time_t)tm->tm_hour, (time_t)tm->tm_min, (time_t)tm->tm_sec,
725 struct tm *tm; local
854 struct tm *tm; local
882 &(tm->tm_mon), &(tm->tm_mday), &(tm->tm_hour),
883 &(tm->tm_min), &(tm->tm_year)) < 4);
890 tm->tm_hour, tm->tm_min, tm->tm_mon + 1,
891 tm->tm_mday, CHECK_TM(tm->tm_year));
[all …]
/illumos-gate/usr/src/lib/smbsrv/libmlsvc/common/
H A Dsrvsvc_clnt.c361 struct tm dc_tm; in srvsvc_timecheck()
362 struct tm *tm; in srvsvc_timecheck() local
387 tm = gmtime(&dc_tv.tv_sec); in srvsvc_timecheck()
389 tm = gmtime(&tnow); in srvsvc_timecheck()
402 struct tm tm; in srvsvc_timesync() local
409 &tv, &tm) != 0) in srvsvc_timesync()
428 struct tm tm; in srvsvc_gettime() local
434 &tv, &tm) != 0) in srvsvc_gettime()
471 struct tm *tm) in srvsvc_net_remote_tod() argument
516 if (tm) { in srvsvc_net_remote_tod()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/sfio/
H A Dsfpkrd.c42 ssize_t sfpkrd(fd, argbuf, n, rc, tm, action) in sfpkrd()
47 long tm; /* time-out */
58 if(rc < 0 && tm < 0 && action <= 0)
128 while(tm >= 0 || action > 0 ||
142 if((r = SFPOLL(&po,1,tm)) < 0)
164 if(tm < 0)
168 tmb.tv_sec = tm/SECOND;
169 tmb.tv_usec = (tm%SECOND)*SECOND;
188 long nsec = tm < 0 ? 0 : (tm+999)/1000;
217 else if(tm >= 0) /* timeout exceeded */
[all …]
/illumos-gate/usr/src/cmd/bhyve/
H A Drtc.c63 struct tm tm; in rtc_time() local
68 localtime_r(&t, &tm); in rtc_time()
69 t = timegm(&tm); in rtc_time()
80 struct tm tm; in rtc_time() local
82 localtime_r(&ts->tv_sec, &tm); in rtc_time()
83 ts->tv_sec = timegm(&tm); in rtc_time()

12345678910>>...13