Lines Matching refs:tm

50 static void determine_days(struct tm *tm)  in determine_days()  argument
55 int y = tm->tm_year + 1900; in determine_days()
56 int m = tm->tm_mon; in determine_days()
57 int d = tm->tm_mday; in determine_days()
60 tm->tm_yday = ydays[m] + d - 1; in determine_days()
63 tm->tm_yday += leap_year(y); in determine_days()
73 tm->tm_wday = (d + (13 * m) / 5 + y + y / 4 + c / 4 + 5 * c + 6) % 7; in determine_days()
76 int ossl_asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) in ossl_asn1_time_to_tm() argument
83 struct tm tmp; in ossl_asn1_time_to_tm()
243 if (tm != NULL) { in ossl_asn1_time_to_tm()
259 if (tm != NULL) in ossl_asn1_time_to_tm()
260 *tm = tmp; in ossl_asn1_time_to_tm()
267 ASN1_TIME *ossl_asn1_time_from_tm(ASN1_TIME *s, struct tm *ts, int type) in ossl_asn1_time_from_tm()
327 struct tm *ts; in ASN1_TIME_adj()
328 struct tm data; in ASN1_TIME_adj()
356 struct tm tm; in ASN1_TIME_to_generalizedtime() local
358 if (!ASN1_TIME_to_tm(t, &tm)) in ASN1_TIME_to_generalizedtime()
364 ret = ossl_asn1_time_from_tm(ret, &tm, V_ASN1_GENERALIZEDTIME); in ASN1_TIME_to_generalizedtime()
383 struct tm tm; in ASN1_TIME_set_string_X509() local
413 if (!ossl_asn1_time_to_tm(&tm, &t)) in ASN1_TIME_set_string_X509()
415 if (is_utc(tm.tm_year)) { in ASN1_TIME_set_string_X509()
441 int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm) in ASN1_TIME_to_tm() argument
447 memset(tm, 0, sizeof(*tm)); in ASN1_TIME_to_tm()
448 if (OPENSSL_gmtime(&now_t, tm) != NULL) in ASN1_TIME_to_tm()
453 return ossl_asn1_time_to_tm(tm, s); in ASN1_TIME_to_tm()
459 struct tm tm_from, tm_to; in ASN1_TIME_diff()
474 int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm) in ASN1_TIME_print() argument
476 return ASN1_TIME_print_ex(bp, tm, ASN1_DTFLGS_RFC822); in ASN1_TIME_print()
480 int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags) in ASN1_TIME_print_ex() argument
482 return ossl_asn1_time_print_ex(bp, tm, flags) > 0; in ASN1_TIME_print_ex()
488 int ossl_asn1_time_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags) in ossl_asn1_time_print_ex() argument
492 struct tm stm; in ossl_asn1_time_print_ex()
496 if (!ossl_asn1_time_to_tm(&stm, tm)) in ossl_asn1_time_print_ex()
499 l = tm->length; in ossl_asn1_time_print_ex()
500 v = (char *)tm->data; in ossl_asn1_time_print_ex()
504 if (tm->type == V_ASN1_GENERALIZEDTIME) { in ossl_asn1_time_print_ex()
512 if (tm->length > 15 && v[14] == period) { in ossl_asn1_time_print_ex()
551 struct tm stm, ttm; in ASN1_TIME_cmp_time_t()
572 struct tm tm; in ASN1_TIME_normalize() local
574 if (!ASN1_TIME_to_tm(t, &tm)) in ASN1_TIME_normalize()
577 return ossl_asn1_time_from_tm(t, &tm, V_ASN1_UNDEF) != NULL; in ASN1_TIME_normalize()