Searched refs:tm (Results 1 - 25 of 28) sorted by relevance

12

/dovecot/src/lib/
H A Dutc-mktime.h6 /* Like mktime(), but assume that tm is in UTC. Unlike mktime(), values in
7 tm fields must be in valid range. Leap second is accepted any time though
9 time_t utc_mktime(const struct tm *tm);
H A Dutc-offset.h7 int utc_offset(struct tm *tm, time_t t);
H A Dutc-mktime.c6 static int tm_cmp(const struct tm *tm1, const struct tm *tm2)
23 static inline void adjust_leap_second(struct tm *tm) argument
25 if (tm->tm_sec == 60)
26 tm->tm_sec = 59;
33 time_t utc_mktime(const struct tm *tm) argument
35 struct tm leap_adj_tm = *tm;
46 utc_mktime(const struct tm *tm) argument
[all...]
H A Dtest-utc-mktime.c40 struct tm tm; local
47 i_zero(&tm);
48 tm.tm_year = test->year - 1900;
49 tm.tm_mon = test->month - 1;
50 tm.tm_mday = test->day;
51 tm.tm_hour = test->hour;
52 tm.tm_min = test->min;
53 tm.tm_sec = test->sec;
55 t = utc_mktime(&tm);
[all...]
H A Dutc-offset.c8 int utc_offset(struct tm *tm, time_t t ATTR_UNUSED) argument
11 return (int) (tm->tm_gmtoff/60);
13 struct tm ltm, gtm;
16 /* gmtime() overwrites tm, so we need to copy it elsewhere */
17 ltm = *tm;
18 tm = gmtime(&t);
19 gtm = *tm;
34 /* restore overwritten tm */
35 *tm
[all...]
H A Diso8601-date.h11 struct tm *tm_r, int *timezone_offset_r);
16 const char *iso8601_date_create_tm(struct tm *tm, int zone_offset);
H A Dtest-iso8601-date.c13 struct tm tm; member in struct:iso8601_date_test
21 .tm = {
26 .tm = {
32 .tm = {
39 .tm = {
45 .tm = {
51 .tm = {
65 struct tm *tm local
127 struct tm tm; local
[all...]
H A Dtime-util.c75 const struct tm *day_tm;
76 struct tm tm; local
80 i_zero(&tm);
81 tm.tm_year = day_tm->tm_year;
82 tm.tm_mon = day_tm->tm_mon;
83 tm.tm_mday = day_tm->tm_mday;
84 tm.tm_isdst = -1;
85 new_start_time = mktime(&tm);
90 static const char *strftime_real(const char *fmt, const struct tm *t argument
105 t_strftime(const char *fmt, const struct tm *tm) argument
[all...]
H A Diso8601-date.c34 struct tm tm; member in struct:iso8601_date_parser
144 if (iso8601_date_parse_number(parser, 2, &parser->tm.tm_hour) <= 0)
153 if (iso8601_date_parse_number(parser, 2, &parser->tm.tm_min) <= 0)
162 if (iso8601_date_parse_number(parser, 2, &parser->tm.tm_sec) <= 0)
185 if (iso8601_date_parse_number(parser, 4, &parser->tm.tm_year) <= 0)
187 if (parser->tm.tm_year < 1900)
189 parser->tm.tm_year -= 1900;
197 if (iso8601_date_parse_number(parser, 2, &parser->tm.tm_mon) <= 0)
199 parser->tm
263 struct tm tm; local
278 iso8601_date_create_tm(struct tm *tm, int timezone_offset) argument
302 struct tm *tm; local
[all...]
H A Dtime-util.h43 const char *t_strftime(const char *fmt, const struct tm *tm) ATTR_STRFTIME(1);
H A Dtest-time-util.c233 const struct tm tests[] = {
260 const struct tm *tm; local
261 struct tm tm_copy;
272 tm = localtime(&t);
273 test_assert_idx(tm->tm_year == tests[i].tm_year &&
274 tm->tm_mon == tests[i].tm_mon &&
275 tm->tm_mday == tests[i].tm_mday, i);
276 test_assert_idx(tm->tm_hour == 0 && tm
[all...]
H A Dfailures.h39 const struct tm *timestamp; /* NULL = use time() + localtime() */
H A Dfailures.c85 const struct tm *tm = ctx->timestamp; local
90 if (tm == NULL) {
93 tm = localtime(&now.tv_sec);
99 get_log_stamp_format("unused", now.tv_usec), tm) > 0)
/dovecot/src/lib-imap/
H A Dimap-date.c30 static const char *imap_parse_date_internal(const char *str, struct tm *tm) argument
37 i_zero(tm);
51 tm->tm_mday = (str[0]-'0');
55 tm->tm_mday = (tm->tm_mday * 10) + (str[1]-'0');
62 tm->tm_mon = i;
75 tm->tm_year = (str[0]-'0') * 1000 + (str[1]-'0') * 100 +
82 static bool imap_mktime(struct tm *tm, time_ argument
110 struct tm tm; local
124 struct tm tm; local
161 imap_to_date_tm(char buf[11], const struct tm *tm) argument
181 imap_to_datetime_tm(const struct tm *tm, int timezone_offset) argument
219 struct tm *tm; local
229 const struct tm *tm; local
238 const struct tm *tm; local
[all...]
/dovecot/src/lib-http/
H A Dhttp-date.h9 struct tm *tm_r);
12 const char *http_date_create_tm(struct tm *tm);
H A Dtest-http-date.c13 struct tm tm; member in struct:http_date_test
21 .tm = {
26 .tm = {
31 .tm = {
36 .tm = {
41 .tm = {
46 .tm = {
51 .tm = {
56 .tm
116 const struct tm *tm = &valid_date_tests[i].tm; local
200 struct tm tm; local
[all...]
H A Dhttp-date.c87 struct tm tm; member in struct:http_date_parser
154 if (http_date_parse_number(parser, 4, &parser->tm.tm_year) <= 0)
156 if (parser->tm.tm_year < 1900)
158 parser->tm.tm_year -= 1900;
179 parser->tm.tm_mon = i;
187 if (http_date_parse_number(parser, 2, &parser->tm.tm_mday) <= 0)
203 if (http_date_parse_number(parser, 2, &parser->tm.tm_hour) <= 0)
212 if (http_date_parse_number(parser, 2, &parser->tm.tm_min) <= 0)
221 if (http_date_parse_number(parser, 2, &parser->tm
460 struct tm *tm; local
470 http_date_create_tm(struct tm *tm) argument
482 struct tm *tm; local
[all...]
/dovecot/src/lib-mail/
H A Dmbox-from.c22 static int mbox_parse_month(const unsigned char *msg, struct tm *tm) argument
28 tm->tm_mon = i;
43 static int mbox_parse_year(const unsigned char *msg, struct tm *tm) argument
49 tm->tm_year = (msg[0]-'0') * 1000 + (msg[1]-'0') * 100 +
58 struct tm tm; local
103 i_zero(&tm);
109 if (mbox_parse_month(msg, &tm) <
252 struct tm *tm; local
[all...]
H A Dmessage-date.c118 struct tm tm; local
124 i_zero(&tm);
145 tm.tm_mday = value[0]-'0';
149 tm.tm_mday = (tm.tm_mday * 10) + (value[1]-'0');
158 tm.tm_mon = i;
172 tm.tm_year = tm.tm_year * 10 + (value[i]-'0');
177 if (tm
262 struct tm *tm; local
[all...]
H A Dtest-mbox-from.c55 struct tm *tm; local
76 tm = localtime(&output[i].time);
77 output[i].tz_offset = utc_offset(tm, output[i].time);
/dovecot/src/plugins/push-notification/
H A Dpush-notification-event-messagenew.c35 struct tm *tm; local
38 tm = gmtime(&data->date);
40 iso8601_date_create_tm(tm, data->date_tz));
/dovecot/src/log/
H A Dlog-connection.c156 const struct tm *tm)
163 failure_ctx.timestamp = tm;
180 const struct tm *tm)
224 client_log_fatal(log, client, cmd + 6, log_time, tm);
229 client_log_fatal(log, client, cmd + 14, log_time, tm);
237 const struct timeval *log_time, const struct tm *tm)
246 log_parse_master_line(line, log_time, tm);
154 client_log_fatal(struct log_connection *log, struct log_client *client, const char *line, const struct timeval *log_time, const struct tm *tm) argument
179 log_parse_master_line(const char *line, const struct timeval *log_time, const struct tm *tm) argument
236 log_it(struct log_connection *log, const char *line, const struct timeval *log_time, const struct tm *tm) argument
339 struct tm tm; local
[all...]
/dovecot/src/lib-storage/
H A Dmail-search-args-imap.c46 struct tm *tm = localtime(&timestamp); local
47 int tz_offset = utc_offset(tm, timestamp);
H A Dmail-search-mime.c377 struct tm *tm; local
380 tm = localtime(&timestamp);
381 tz_offset = utc_offset(tm, timestamp);
/dovecot/src/plugins/fts-lucene/
H A Dlucene-wrapper.cc1097 Term* tm = _CLNEW Term(_field, v.at(0)->termBuffer()); local
1100 ret = _CLNEW FuzzyQuery( tm );
1102 ret = _CLNEW TermQuery( tm );
1103 _CLDECDELETE(tm);
1111 Term* tm = _CLNEW Term(_field, v.at(i)->termBuffer()); local
1112 q->add(_CLNEW TermQuery(tm), true, BooleanClause::SHOULD);
1113 _CLDECDELETE(tm);
1142 Term* tm = _CLNEW Term(_field, t->termBuffer()); local
1144 pq->add(tm,position);
1145 _CLDECDELETE(tm);
1161 Term* tm = _CLNEW Term(key, wstr); local
[all...]

Completed in 65 milliseconds

12