dt 55 include/crm/common/iso8601.h void crm_time_free(crm_time_t * dt); dt 58 include/crm/common/iso8601.h char *crm_time_as_string(crm_time_t * dt, int flags); dt 60 include/crm/common/iso8601.h #define crm_time_log(level, prefix, dt, flags) \ dt 61 include/crm/common/iso8601.h crm_time_log_alias(level, __FILE__, __func__, __LINE__, prefix, dt, flags) dt 77 include/crm/common/iso8601.h crm_time_t *crm_time_calculate_duration(crm_time_t * dt, crm_time_t * value); dt 81 include/crm/common/iso8601.h int crm_time_compare(crm_time_t * dt, crm_time_t * rhs); dt 83 include/crm/common/iso8601.h int crm_time_get_timeofday(crm_time_t * dt, uint32_t * h, uint32_t * m, uint32_t * s); dt 84 include/crm/common/iso8601.h int crm_time_get_timezone(crm_time_t * dt, uint32_t * h, uint32_t * m); dt 85 include/crm/common/iso8601.h int crm_time_get_gregorian(crm_time_t * dt, uint32_t * y, uint32_t * m, uint32_t * d); dt 86 include/crm/common/iso8601.h int crm_time_get_ordinal(crm_time_t * dt, uint32_t * y, uint32_t * d); dt 87 include/crm/common/iso8601.h int crm_time_get_isoweek(crm_time_t * dt, uint32_t * y, uint32_t * w, uint32_t * d); dt 90 include/crm/common/iso8601.h long long int crm_time_get_seconds(crm_time_t * dt); dt 93 include/crm/common/iso8601.h long long int crm_time_get_seconds_since_epoch(crm_time_t * dt); dt 100 include/crm/common/iso8601.h crm_time_t *crm_time_add(crm_time_t * dt, crm_time_t * value); dt 101 include/crm/common/iso8601.h crm_time_t *crm_time_subtract(crm_time_t * dt, crm_time_t * value); dt 104 include/crm/common/iso8601.h void crm_time_add_seconds(crm_time_t * dt, int value); dt 105 include/crm/common/iso8601.h void crm_time_add_minutes(crm_time_t * dt, int value); dt 106 include/crm/common/iso8601.h void crm_time_add_hours(crm_time_t * dt, int value); dt 107 include/crm/common/iso8601.h void crm_time_add_days(crm_time_t * dt, int value); dt 108 include/crm/common/iso8601.h void crm_time_add_weeks(crm_time_t * dt, int value); dt 109 include/crm/common/iso8601.h void crm_time_add_months(crm_time_t * dt, int value); dt 110 include/crm/common/iso8601.h void crm_time_add_years(crm_time_t * dt, int value); dt 118 include/crm/common/iso8601.h bool crm_time_check(crm_time_t * dt); dt 20 include/crm/common/iso8601_internal.h pcmk__time_hr_t *pcmk__time_hr_convert(pcmk__time_hr_t *target, crm_time_t *dt); dt 63 lib/common/iso8601.c crm_get_utc_time(crm_time_t *dt) dt 67 lib/common/iso8601.c if (dt == NULL) { dt 73 lib/common/iso8601.c utc->years = dt->years; dt 74 lib/common/iso8601.c utc->days = dt->days; dt 75 lib/common/iso8601.c utc->seconds = dt->seconds; dt 78 lib/common/iso8601.c if (dt->offset) { dt 79 lib/common/iso8601.c crm_time_add_seconds(utc, -dt->offset); dt 82 lib/common/iso8601.c utc->months = dt->months; dt 85 lib/common/iso8601.c crm_time_log(LOG_TRACE, "utc-source", dt, dt 96 lib/common/iso8601.c crm_time_t *dt = NULL; dt 101 lib/common/iso8601.c dt = crm_time_new_undefined(); dt 102 lib/common/iso8601.c crm_time_set_timet(dt, &tm_now); dt 104 lib/common/iso8601.c dt = parse_date(date_time); dt 106 lib/common/iso8601.c return dt; dt 141 lib/common/iso8601.c crm_time_free(crm_time_t * dt) dt 143 lib/common/iso8601.c if (dt == NULL) { dt 146 lib/common/iso8601.c free(dt); dt 292 lib/common/iso8601.c crm_time_get_timeofday(crm_time_t * dt, uint * h, uint * m, uint * s) dt 294 lib/common/iso8601.c crm_time_get_sec(dt->seconds, h, m, s); dt 299 lib/common/iso8601.c crm_time_get_timezone(crm_time_t * dt, uint * h, uint * m) dt 303 lib/common/iso8601.c crm_time_get_sec(dt->seconds, h, m, &s); dt 308 lib/common/iso8601.c crm_time_get_seconds(crm_time_t * dt) dt 314 lib/common/iso8601.c if (dt == NULL) { dt 318 lib/common/iso8601.c utc = crm_get_utc_time(dt); dt 351 lib/common/iso8601.c crm_time_get_seconds_since_epoch(crm_time_t * dt) dt 353 lib/common/iso8601.c return (dt == NULL)? 0 : (crm_time_get_seconds(dt) - EPOCH_SECONDS); dt 357 lib/common/iso8601.c crm_time_get_gregorian(crm_time_t * dt, uint * y, uint * m, uint * d) dt 360 lib/common/iso8601.c int days = dt->days; dt 362 lib/common/iso8601.c if(dt->years != 0) { dt 364 lib/common/iso8601.c int mdays = crm_time_days_in_month(months, dt->years); dt 373 lib/common/iso8601.c } else if (dt->months) { dt 375 lib/common/iso8601.c months = dt->months; dt 381 lib/common/iso8601.c *y = dt->years; dt 384 lib/common/iso8601.c crm_trace("%.4d-%.3d -> %.4d-%.2d-%.2d", dt->years, dt->days, dt->years, months, days); dt 389 lib/common/iso8601.c crm_time_get_ordinal(crm_time_t * dt, uint * y, uint * d) dt 391 lib/common/iso8601.c *y = dt->years; dt 392 lib/common/iso8601.c *d = dt->days; dt 397 lib/common/iso8601.c crm_time_get_isoweek(crm_time_t * dt, uint * y, uint * w, uint * d) dt 404 lib/common/iso8601.c int jan1 = crm_time_january1_weekday(dt->years); dt 407 lib/common/iso8601.c CRM_CHECK(dt->days > 0, return FALSE); dt 410 lib/common/iso8601.c h = dt->days + jan1 - 1; dt 414 lib/common/iso8601.c if (dt->days <= (8 - jan1) && jan1 > 4) { dt 416 lib/common/iso8601.c year_num = dt->years - 1; dt 420 lib/common/iso8601.c year_num = dt->years; dt 424 lib/common/iso8601.c if (year_num == dt->years) { dt 428 lib/common/iso8601.c if ((dmax - dt->days) < correction) { dt 429 lib/common/iso8601.c crm_trace("year++, jan1=%d, i=%d vs. %d", jan1, dmax - dt->days, correction); dt 430 lib/common/iso8601.c year_num = dt->years + 1; dt 436 lib/common/iso8601.c if (year_num == dt->years) { dt 437 lib/common/iso8601.c int j = dt->days + (7 - *d) + (jan1 - 1); dt 446 lib/common/iso8601.c crm_trace("Converted %.4d-%.3d to %.4d-W%.2d-%d", dt->years, dt->days, *y, *w, *d); dt 453 lib/common/iso8601.c crm_duration_as_string(crm_time_t *dt, char *result) dt 457 lib/common/iso8601.c if (dt->years) { dt 459 lib/common/iso8601.c dt->years, pcmk__plural_s(dt->years)); dt 461 lib/common/iso8601.c if (dt->months) { dt 463 lib/common/iso8601.c dt->months, pcmk__plural_s(dt->months)); dt 465 lib/common/iso8601.c if (dt->days) { dt 467 lib/common/iso8601.c dt->days, pcmk__plural_s(dt->days)); dt 470 lib/common/iso8601.c if (((offset == 0) || (dt->seconds != 0)) dt 471 lib/common/iso8601.c && (dt->seconds > -60) && (dt->seconds < 60)) { dt 473 lib/common/iso8601.c dt->seconds, pcmk__plural_s(dt->seconds)); dt 474 lib/common/iso8601.c } else if (dt->seconds) { dt 478 lib/common/iso8601.c dt->seconds); dt 479 lib/common/iso8601.c crm_time_get_sec(dt->seconds, &h, &m, &s); dt 499 lib/common/iso8601.c crm_time_t *dt = NULL; dt 510 lib/common/iso8601.c dt = utc; dt 512 lib/common/iso8601.c dt = date_time; dt 515 lib/common/iso8601.c if (!crm_time_is_defined(dt)) { dt 544 lib/common/iso8601.c if (crm_time_get_isoweek(dt, &y, &w, &d)) { dt 552 lib/common/iso8601.c if (crm_time_get_ordinal(dt, &y, &d)) { dt 560 lib/common/iso8601.c if (crm_time_get_gregorian(dt, &y, &m, &d)) { dt 574 lib/common/iso8601.c if (crm_time_get_timeofday(dt, &h, &m, &s)) { dt 579 lib/common/iso8601.c if ((flags & crm_time_log_with_timezone) && (dt->offset != 0)) { dt 580 lib/common/iso8601.c crm_time_get_sec(dt->offset, &h, &m, &s); dt 583 lib/common/iso8601.c ((dt->offset < 0)? '-' : '+'), h, m); dt 763 lib/common/iso8601.c crm_time_t *dt = NULL; dt 778 lib/common/iso8601.c dt = crm_time_new(NULL); dt 787 lib/common/iso8601.c dt = crm_time_new_undefined(); dt 791 lib/common/iso8601.c dt->days = 1; dt 792 lib/common/iso8601.c dt->years = 1970; dt 793 lib/common/iso8601.c crm_time_log(LOG_TRACE, "Unpacked", dt, crm_time_log_date | crm_time_log_timeofday); dt 794 lib/common/iso8601.c return dt; dt 814 lib/common/iso8601.c dt->years = year; dt 815 lib/common/iso8601.c dt->days = get_ordinal_days(year, month, day); dt 817 lib/common/iso8601.c year, dt->days, date_str); dt 833 lib/common/iso8601.c dt->days = day; dt 834 lib/common/iso8601.c dt->years = year; dt 867 lib/common/iso8601.c dt->years = year; dt 868 lib/common/iso8601.c crm_time_add_days(dt, (week - 1) * 7); dt 871 lib/common/iso8601.c crm_time_add_days(dt, 1 - jan1); dt 873 lib/common/iso8601.c crm_time_add_days(dt, 8 - jan1); dt 876 lib/common/iso8601.c crm_time_add_days(dt, day); dt 894 lib/common/iso8601.c if ((time_s != NULL) && (crm_time_parse(time_s, dt) == FALSE)) { dt 898 lib/common/iso8601.c crm_time_log(LOG_TRACE, "Unpacked", dt, crm_time_log_date | crm_time_log_timeofday); dt 899 lib/common/iso8601.c if (crm_time_check(dt) == FALSE) { dt 904 lib/common/iso8601.c return dt; dt 907 lib/common/iso8601.c crm_time_free(dt); dt 1270 lib/common/iso8601.c crm_time_add(crm_time_t * dt, crm_time_t * value) dt 1275 lib/common/iso8601.c if ((dt == NULL) || (value == NULL)) { dt 1280 lib/common/iso8601.c answer = pcmk_copy_time(dt); dt 1298 lib/common/iso8601.c crm_time_calculate_duration(crm_time_t * dt, crm_time_t * value) dt 1303 lib/common/iso8601.c if ((dt == NULL) || (value == NULL)) { dt 1313 lib/common/iso8601.c answer = crm_get_utc_time(dt); dt 1332 lib/common/iso8601.c crm_time_subtract(crm_time_t * dt, crm_time_t * value) dt 1337 lib/common/iso8601.c if ((dt == NULL) || (value == NULL)) { dt 1347 lib/common/iso8601.c answer = pcmk_copy_time(dt); dt 1366 lib/common/iso8601.c crm_time_check(crm_time_t * dt) dt 1368 lib/common/iso8601.c return (dt != NULL) dt 1369 lib/common/iso8601.c && (dt->days > 0) && (dt->days <= year_days(dt->years)) dt 1370 lib/common/iso8601.c && (dt->seconds >= 0) && (dt->seconds < DAY_SECONDS); dt 1556 lib/common/iso8601.c pcmk__time_hr_convert(pcmk__time_hr_t *target, crm_time_t *dt) dt 1560 lib/common/iso8601.c if (dt) { dt 1564 lib/common/iso8601.c .years = dt->years, dt 1565 lib/common/iso8601.c .months = dt->months, dt 1566 lib/common/iso8601.c .days = dt->days, dt 1567 lib/common/iso8601.c .seconds = dt->seconds, dt 1568 lib/common/iso8601.c .offset = dt->offset, dt 1569 lib/common/iso8601.c .duration = dt->duration dt 1593 lib/common/iso8601.c crm_time_t dt; dt 1596 lib/common/iso8601.c crm_time_set_timet(&dt, &tv->tv_sec); dt 1597 lib/common/iso8601.c ret = pcmk__time_hr_convert(target, &dt); dt 1615 lib/common/iso8601.c crm_time_t *dt; dt 1617 lib/common/iso8601.c dt = parse_date(date_time); dt 1618 lib/common/iso8601.c hr_dt = pcmk__time_hr_convert(NULL, dt); dt 1619 lib/common/iso8601.c crm_time_free(dt); dt 1638 lib/common/iso8601.c crm_time_t dt; dt 1643 lib/common/iso8601.c pcmk__time_set_hr_dt(&dt, hr_dt); dt 1644 lib/common/iso8601.c ha_get_tm_time(&tm, &dt);