dt 62 include/crm/common/iso8601.h void crm_time_free(crm_time_t * dt); dt 64 include/crm/common/iso8601.h char *crm_time_as_string(crm_time_t * dt, int flags); dt 66 include/crm/common/iso8601.h # define crm_time_log(level, prefix, dt, flags) crm_time_log_alias(level, __FILE__, __FUNCTION__, __LINE__, prefix, dt, flags) dt 81 include/crm/common/iso8601.h crm_time_t *crm_time_calculate_duration(crm_time_t * dt, crm_time_t * value); dt 84 include/crm/common/iso8601.h int crm_time_compare(crm_time_t * dt, crm_time_t * rhs); dt 86 include/crm/common/iso8601.h int crm_time_get_timeofday(crm_time_t * dt, uint32_t * h, uint32_t * m, uint32_t * s); dt 87 include/crm/common/iso8601.h int crm_time_get_timezone(crm_time_t * dt, uint32_t * h, uint32_t * m); dt 88 include/crm/common/iso8601.h int crm_time_get_gregorian(crm_time_t * dt, uint32_t * y, uint32_t * m, uint32_t * d); dt 89 include/crm/common/iso8601.h int crm_time_get_ordinal(crm_time_t * dt, uint32_t * y, uint32_t * d); dt 90 include/crm/common/iso8601.h int crm_time_get_isoweek(crm_time_t * dt, uint32_t * y, uint32_t * w, uint32_t * d); dt 93 include/crm/common/iso8601.h long long int crm_time_get_seconds(crm_time_t * dt); dt 96 include/crm/common/iso8601.h long long int crm_time_get_seconds_since_epoch(crm_time_t * dt); dt 102 include/crm/common/iso8601.h crm_time_t *crm_time_add(crm_time_t * dt, crm_time_t * value); dt 103 include/crm/common/iso8601.h crm_time_t *crm_time_subtract(crm_time_t * dt, crm_time_t * value); dt 106 include/crm/common/iso8601.h void crm_time_add_seconds(crm_time_t * dt, int value); dt 107 include/crm/common/iso8601.h void crm_time_add_minutes(crm_time_t * dt, int value); dt 108 include/crm/common/iso8601.h void crm_time_add_hours(crm_time_t * dt, int value); dt 109 include/crm/common/iso8601.h void crm_time_add_days(crm_time_t * dt, int value); dt 110 include/crm/common/iso8601.h void crm_time_add_weekdays(crm_time_t * dt, int value); dt 111 include/crm/common/iso8601.h void crm_time_add_weeks(crm_time_t * dt, int value); dt 112 include/crm/common/iso8601.h void crm_time_add_months(crm_time_t * dt, int value); dt 113 include/crm/common/iso8601.h void crm_time_add_years(crm_time_t * dt, int value); dt 114 include/crm/common/iso8601.h void crm_time_add_ordinalyears(crm_time_t * dt, int value); dt 115 include/crm/common/iso8601.h void crm_time_add_weekyears(crm_time_t * dt, int value); dt 123 include/crm/common/iso8601.h bool crm_time_check(crm_time_t * dt); dt 27 include/crm/common/iso8601_internal.h crm_time_hr_t *crm_time_hr_convert(crm_time_hr_t *target, crm_time_t *dt); dt 75 lib/common/iso8601.c crm_get_utc_time(crm_time_t * dt) dt 79 lib/common/iso8601.c utc->years = dt->years; dt 80 lib/common/iso8601.c utc->days = dt->days; dt 81 lib/common/iso8601.c utc->seconds = dt->seconds; dt 84 lib/common/iso8601.c if (dt->offset) { dt 85 lib/common/iso8601.c crm_time_add_seconds(utc, -dt->offset); dt 88 lib/common/iso8601.c utc->months = dt->months; dt 91 lib/common/iso8601.c crm_time_log(LOG_TRACE, "utc-source", dt, dt 102 lib/common/iso8601.c crm_time_t *dt = NULL; dt 107 lib/common/iso8601.c dt = calloc(1, sizeof(crm_time_t)); dt 108 lib/common/iso8601.c crm_time_set_timet(dt, &tm_now); dt 110 lib/common/iso8601.c dt = parse_date(date_time); dt 112 lib/common/iso8601.c return dt; dt 116 lib/common/iso8601.c crm_time_free(crm_time_t * dt) dt 118 lib/common/iso8601.c if (dt == NULL) { dt 121 lib/common/iso8601.c free(dt); dt 256 lib/common/iso8601.c crm_time_get_timeofday(crm_time_t * dt, uint * h, uint * m, uint * s) dt 258 lib/common/iso8601.c return crm_time_get_sec(dt->seconds, h, m, s); dt 262 lib/common/iso8601.c crm_time_get_timezone(crm_time_t * dt, uint * h, uint * m) dt 266 lib/common/iso8601.c return crm_time_get_sec(dt->seconds, h, m, &s); dt 270 lib/common/iso8601.c crm_time_get_seconds(crm_time_t * dt) dt 276 lib/common/iso8601.c utc = crm_get_utc_time(dt); dt 306 lib/common/iso8601.c crm_time_get_seconds_since_epoch(crm_time_t * dt) dt 308 lib/common/iso8601.c return crm_time_get_seconds(dt) - EPOCH_SECONDS; dt 312 lib/common/iso8601.c crm_time_get_gregorian(crm_time_t * dt, uint * y, uint * m, uint * d) dt 315 lib/common/iso8601.c int days = dt->days; dt 317 lib/common/iso8601.c if(dt->years != 0) { dt 319 lib/common/iso8601.c int mdays = crm_time_days_in_month(months, dt->years); dt 328 lib/common/iso8601.c } else if (dt->months) { dt 330 lib/common/iso8601.c months = dt->months; dt 336 lib/common/iso8601.c *y = dt->years; dt 339 lib/common/iso8601.c crm_trace("%.4d-%.3d -> %.4d-%.2d-%.2d", dt->years, dt->days, dt->years, months, days); dt 344 lib/common/iso8601.c crm_time_get_ordinal(crm_time_t * dt, uint * y, uint * d) dt 346 lib/common/iso8601.c *y = dt->years; dt 347 lib/common/iso8601.c *d = dt->days; dt 352 lib/common/iso8601.c crm_time_get_isoweek(crm_time_t * dt, uint * y, uint * w, uint * d) dt 359 lib/common/iso8601.c int jan1 = crm_time_january1_weekday(dt->years); dt 362 lib/common/iso8601.c CRM_CHECK(dt->days > 0, return FALSE); dt 365 lib/common/iso8601.c h = dt->days + jan1 - 1; dt 369 lib/common/iso8601.c if (dt->days <= (8 - jan1) && jan1 > 4) { dt 371 lib/common/iso8601.c year_num = dt->years - 1; dt 375 lib/common/iso8601.c year_num = dt->years; dt 379 lib/common/iso8601.c if (year_num == dt->years) { dt 383 lib/common/iso8601.c if ((dmax - dt->days) < correction) { dt 384 lib/common/iso8601.c crm_trace("year++, jan1=%d, i=%d vs. %d", jan1, dmax - dt->days, correction); dt 385 lib/common/iso8601.c year_num = dt->years + 1; dt 391 lib/common/iso8601.c if (year_num == dt->years) { dt 392 lib/common/iso8601.c int j = dt->days + (7 - *d) + (jan1 - 1); dt 401 lib/common/iso8601.c crm_trace("Converted %.4d-%.3d to %.4d-W%.2d-%d", dt->years, dt->days, *y, *w, *d); dt 414 lib/common/iso8601.c crm_time_t *dt = NULL; dt 423 lib/common/iso8601.c dt = utc; dt 425 lib/common/iso8601.c dt = date_time; dt 428 lib/common/iso8601.c CRM_CHECK(dt != NULL, return NULL); dt 434 lib/common/iso8601.c crm_time_get_sec(dt->seconds, &h, &m, &s); dt 440 lib/common/iso8601.c if(dt->years) { dt 441 lib/common/iso8601.c offset += snprintf(date_s+offset, DATE_MAX - offset, "%4d year%s ", dt->years, dt->years>1?"s":""); dt 443 lib/common/iso8601.c if(dt->months) { dt 444 lib/common/iso8601.c offset += snprintf(date_s+offset, DATE_MAX - offset, "%2d month%s ", dt->months, dt->months>1?"s":""); dt 446 lib/common/iso8601.c if(dt->days) { dt 447 lib/common/iso8601.c offset += snprintf(date_s+offset, DATE_MAX - offset, "%2d day%s ", dt->days, dt->days>1?"s":""); dt 449 lib/common/iso8601.c if(dt->seconds) { dt 450 lib/common/iso8601.c offset += snprintf(date_s+offset, DATE_MAX - offset, "%d seconds ( ", dt->seconds); dt 486 lib/common/iso8601.c if (crm_time_get_isoweek(dt, &y, &w, &d)) { dt 494 lib/common/iso8601.c if (crm_time_get_ordinal(dt, &y, &d)) { dt 502 lib/common/iso8601.c if (crm_time_get_gregorian(dt, &y, &m, &d)) { dt 516 lib/common/iso8601.c if (crm_time_get_timeofday(dt, &h, &m, &s)) { dt 520 lib/common/iso8601.c if (dt->offset != 0) { dt 521 lib/common/iso8601.c crm_time_get_sec(dt->offset, &h, &m, &s); dt 525 lib/common/iso8601.c if ((flags & crm_time_log_with_timezone) == 0 || dt->offset == 0) { dt 530 lib/common/iso8601.c snprintf(offset_s, 24, " %c%.2u:%.2u", dt->offset < 0 ? '-' : '+', h, m); dt 623 lib/common/iso8601.c crm_time_t *dt = a_time; dt 627 lib/common/iso8601.c dt = calloc(1, sizeof(crm_time_t)); dt 631 lib/common/iso8601.c dt->seconds = crm_time_parse_sec(time_str); dt 644 lib/common/iso8601.c dt->offset = crm_time_parse_offset(offset_s); dt 645 lib/common/iso8601.c crm_time_get_sec(dt->offset, &h, &m, &s); dt 646 lib/common/iso8601.c crm_trace("Got tz: %c%2.d:%.2d", dt->offset < 0 ? '-' : '+', h, m); dt 647 lib/common/iso8601.c return dt; dt 654 lib/common/iso8601.c crm_time_t *dt = NULL; dt 667 lib/common/iso8601.c dt = crm_time_new(NULL); dt 668 lib/common/iso8601.c dt = crm_time_parse(date_str, dt); dt 672 lib/common/iso8601.c dt = calloc(1, sizeof(crm_time_t)); dt 676 lib/common/iso8601.c dt->days = 1; dt 677 lib/common/iso8601.c dt->years = 1970; dt 678 lib/common/iso8601.c crm_time_log(LOG_TRACE, "Unpacked", dt, crm_time_log_date | crm_time_log_timeofday); dt 679 lib/common/iso8601.c return dt; dt 694 lib/common/iso8601.c dt->years = year; dt 695 lib/common/iso8601.c dt->days = get_ordinal_days(year, month, day); dt 696 lib/common/iso8601.c crm_trace("Got gergorian date: %.4d-%.3d", year, dt->days); dt 708 lib/common/iso8601.c dt->days = day; dt 709 lib/common/iso8601.c dt->years = year; dt 739 lib/common/iso8601.c dt->years = year; dt 740 lib/common/iso8601.c crm_time_add_days(dt, (week - 1) * 7); dt 743 lib/common/iso8601.c crm_time_add_days(dt, 1 - jan1); dt 745 lib/common/iso8601.c crm_time_add_days(dt, 8 - jan1); dt 748 lib/common/iso8601.c crm_time_add_days(dt, day); dt 761 lib/common/iso8601.c if (dt && time_s) { dt 763 lib/common/iso8601.c crm_time_parse(time_s, dt); dt 766 lib/common/iso8601.c crm_time_log(LOG_TRACE, "Unpacked", dt, crm_time_log_date | crm_time_log_timeofday); dt 768 lib/common/iso8601.c CRM_CHECK(crm_time_check(dt), return NULL); dt 770 lib/common/iso8601.c return dt; dt 1051 lib/common/iso8601.c crm_time_add(crm_time_t * dt, crm_time_t * value) dt 1056 lib/common/iso8601.c CRM_CHECK(dt != NULL && value != NULL, return NULL); dt 1059 lib/common/iso8601.c crm_time_set(answer, dt); dt 1073 lib/common/iso8601.c crm_time_calculate_duration(crm_time_t * dt, crm_time_t * value) dt 1078 lib/common/iso8601.c CRM_CHECK(dt != NULL && value != NULL, return NULL); dt 1081 lib/common/iso8601.c answer = crm_get_utc_time(dt); dt 1096 lib/common/iso8601.c crm_time_subtract(crm_time_t * dt, crm_time_t * value) dt 1101 lib/common/iso8601.c CRM_CHECK(dt != NULL && value != NULL, return NULL); dt 1104 lib/common/iso8601.c crm_time_set(answer, dt); dt 1118 lib/common/iso8601.c crm_time_check(crm_time_t * dt) dt 1122 lib/common/iso8601.c CRM_CHECK(dt != NULL, return FALSE); dt 1124 lib/common/iso8601.c ydays = year_days(dt->years); dt 1127 lib/common/iso8601.c CRM_CHECK(dt->days > 0, return FALSE); dt 1128 lib/common/iso8601.c CRM_CHECK(dt->days <= ydays, return FALSE); dt 1130 lib/common/iso8601.c CRM_CHECK(dt->seconds >= 0, return FALSE); dt 1131 lib/common/iso8601.c CRM_CHECK(dt->seconds < 24 * 60 * 60, return FALSE); dt 1307 lib/common/iso8601.c crm_time_hr_convert(crm_time_hr_t *target, crm_time_t *dt) dt 1311 lib/common/iso8601.c if (dt) { dt 1315 lib/common/iso8601.c .years = dt->years, dt 1316 lib/common/iso8601.c .months = dt->months, dt 1317 lib/common/iso8601.c .days = dt->days, dt 1318 lib/common/iso8601.c .seconds = dt->seconds, dt 1319 lib/common/iso8601.c .offset = dt->offset, dt 1320 lib/common/iso8601.c .duration = dt->duration dt 1345 lib/common/iso8601.c crm_time_t dt; dt 1348 lib/common/iso8601.c crm_time_set_timet(&dt, &tv->tv_sec); dt 1349 lib/common/iso8601.c ret = crm_time_hr_convert(target, &dt); dt 1367 lib/common/iso8601.c crm_time_t *dt; dt 1369 lib/common/iso8601.c dt = parse_date(date_time); dt 1370 lib/common/iso8601.c hr_dt = crm_time_hr_convert(NULL, dt); dt 1371 lib/common/iso8601.c crm_time_free(dt); dt 1390 lib/common/iso8601.c crm_time_t dt; dt 1395 lib/common/iso8601.c crm_time_set_hr_dt(&dt, hr_dt); dt 1396 lib/common/iso8601.c ha_get_tm_time(&tm, &dt);