- if ((tm1.tm_year != tm2.tm_year) ||
- (tm1.tm_mon != tm2.tm_mon) ||
- (tm1.tm_mday != tm2.tm_mday) ||
- (tm1.tm_hour != tm2.tm_hour) ||
- (tm1.tm_min != tm2.tm_min) || (tm1.tm_sec != tm2.tm_sec)) {
- fprintf(stderr, "TIME ERROR!!\n");
- fprintf(stderr, "Time1: %d/%d/%d, %d:%02d:%02d\n",
- tm2.tm_mday, tm2.tm_mon + 1, tm2.tm_year + 1900,
- tm2.tm_hour, tm2.tm_min, tm2.tm_sec);
- fprintf(stderr, "Time2: %d/%d/%d, %d:%02d:%02d\n",
- tm1.tm_mday, tm1.tm_mon + 1, tm1.tm_year + 1900,
- tm1.tm_hour, tm1.tm_min, tm1.tm_sec);
+ if (!TEST_int_eq(tm1.tm_year, tm2.tm_year)
+ || !TEST_int_eq(tm1.tm_mon, tm2.tm_mon)
+ || !TEST_int_eq(tm1.tm_mday, tm2.tm_mday)
+ || !TEST_int_eq(tm1.tm_hour, tm2.tm_hour)
+ || !TEST_int_eq(tm1.tm_min, tm2.tm_min)
+ || !TEST_int_eq(tm1.tm_sec, tm2.tm_sec)
+ || !TEST_true(OPENSSL_gmtime_diff(&off_day, &off_sec, &o1, &tm1)))