CUBRID Engine
latest
|
Go to the source code of this file.
Functions | |
int | db_date_weekday (DB_DATE *date) |
int | db_date_to_string (char *buf, int bufsize, DB_DATE *date) |
bool | db_string_check_explicit_date (const char *str, int str_len) |
int | db_string_to_date (const char *buf, DB_DATE *date) |
int | db_string_to_date_ex (const char *buf, int str_len, DB_DATE *date) |
int | db_date_parse_date (char const *str, int str_len, DB_DATE *date) |
int | db_datetime_encode (DB_DATETIME *datetime, int month, int day, int year, int hour, int minute, int second, int millisecond) |
int | db_datetime_decode (const DB_DATETIME *datetime, int *month, int *day, int *year, int *hour, int *minute, int *second, int *millisecond) |
int | db_datetime_to_string (char *buf, int bufsize, DB_DATETIME *datetime) |
int | db_datetimetz_to_string (char *buf, int bufsize, DB_DATETIME *dt, const TZ_ID *tz_id) |
int | db_datetimeltz_to_string (char *buf, int bufsize, DB_DATETIME *dt) |
int | db_datetime_to_string2 (char *buf, int bufsize, DB_DATETIME *datetime) |
int | db_string_to_datetime (const char *str, DB_DATETIME *datetime) |
int | db_string_to_datetime_ex (const char *str, int str_len, DB_DATETIME *datetime) |
int | db_string_to_datetimetz (const char *str, DB_DATETIMETZ *dt_tz, bool *has_zone) |
int | db_string_to_datetimetz_ex (const char *str, int str_len, DB_DATETIMETZ *dt_tz, bool *has_zone) |
int | db_string_to_datetimeltz (const char *str, DB_DATETIME *datetime) |
int | db_string_to_datetimeltz_ex (const char *str, int str_len, DB_DATETIME *datetime) |
int | db_date_parse_datetime_parts (char const *str, int str_len, DB_DATETIME *date, bool *is_explicit_time, bool *has_explicit_msec, bool *fits_as_timestamp, char const **endp) |
int | db_date_parse_datetime (char const *str, int str_len, DB_DATETIME *datetime) |
int | db_subtract_int_from_datetime (DB_DATETIME *dt1, DB_BIGINT i2, DB_DATETIME *result_datetime) |
int | db_add_int_to_datetime (DB_DATETIME *datetime, DB_BIGINT i2, DB_DATETIME *result_datetime) |
int | db_timestamp_encode (DB_TIMESTAMP *utime, DB_DATE *date, DB_TIME *timeval) |
int | db_timestamp_encode_ses (const DB_DATE *date, const DB_TIME *timeval, DB_TIMESTAMP *utime, TZ_ID *dest_tz_id) |
int | db_timestamp_encode_sys (const DB_DATE *date, const DB_TIME *timeval, DB_TIMESTAMP *utime, TZ_ID *dest_tz_id) |
int | db_timestamp_encode_utc (const DB_DATE *date, const DB_TIME *timeval, DB_TIMESTAMP *utime) |
int | db_timestamp_decode_ses (const DB_TIMESTAMP *utime, DB_DATE *date, DB_TIME *timeval) |
void | db_timestamp_decode_utc (const DB_TIMESTAMP *utime, DB_DATE *date, DB_TIME *timeval) |
int | db_timestamp_decode_w_reg (const DB_TIMESTAMP *utime, const TZ_REGION *tz_region, DB_DATE *date, DB_TIME *timeval) |
int | db_timestamp_decode_w_tz_id (const DB_TIMESTAMP *utime, const TZ_ID *tz_id, DB_DATE *date, DB_TIME *timeval) |
int | db_timestamp_to_string (char *buf, int bufsize, DB_TIMESTAMP *utime) |
int | db_timestamptz_to_string (char *buf, int bufsize, DB_TIMESTAMP *utime, const TZ_ID *tz_id) |
int | db_timestampltz_to_string (char *buf, int bufsize, DB_TIMESTAMP *utime) |
int | db_string_to_timestamp (const char *buf, DB_TIMESTAMP *utime) |
int | db_string_to_timestamp_ex (const char *buf, int buf_len, DB_TIMESTAMP *utime) |
int | db_date_parse_timestamp (char const *str, int str_len, DB_TIMESTAMP *utime) |
int | db_string_to_timestamptz (const char *str, DB_TIMESTAMPTZ *ts_tz, bool *has_zone) |
int | db_string_to_timestamptz_ex (const char *str, int str_len, DB_TIMESTAMPTZ *ts_tz, bool *has_zone, bool is_cast) |
int | db_string_to_timestampltz (const char *str, DB_TIMESTAMP *ts) |
int | db_string_to_timestampltz_ex (const char *str, int str_len, DB_TIMESTAMP *ts) |
int | db_time_to_string (char *buf, int bufsize, DB_TIME *dbtime) |
bool | db_string_check_explicit_time (const char *str, int str_len) |
int | db_string_to_time (const char *buf, DB_TIME *dbtime) |
int | db_string_to_time_ex (const char *buf, int buf_len, DB_TIME *dbtime) |
int | db_date_parse_time (char const *str, int str_len, DB_TIME *time, int *milisec) |
time_t | db_mktime (DB_DATE *date, DB_TIME *timeval) |
int | db_strftime (char *s, int smax, const char *fmt, DB_DATE *date, DB_TIME *timeval) |
void | db_localtime (time_t *epoch_time, DB_DATE *date, DB_TIME *timeval) |
void | db_localdatetime (time_t *epoch_time, DB_DATETIME *datetime) |
void | db_localdatetime_msec (time_t *epoch_time, int millisecond, DB_DATETIME *datetime) |
int | julian_encode (int m, int d, int y) |
void | julian_decode (int jul, int *monthp, int *dayp, int *yearp, int *weekp) |
int | day_of_week (int jul_day) |
bool | is_leap_year (int year) |
int | db_tm_encode (struct tm *c_time_struct, DB_DATE *date, DB_TIME *timeval) |
int | db_get_day_of_year (int year, int month, int day) |
int | db_get_day_of_week (int year, int month, int day) |
int | db_get_week_of_year (int year, int month, int day, int mode) |
int | db_check_time_date_format (const char *format_s) |
int | db_add_weeks_and_days_to_date (int *day, int *month, int *year, int weeks, int day_week) |
int day_of_week | ( | int | jul_day | ) |
Definition at line 176 of file db_date.c.
References IGREG_SPECIAL.
Referenced by db_date_weekday(), db_get_date_weekday(), get_date_weekday(), get_day(), round_date(), and truncate_date().
int db_add_int_to_datetime | ( | DB_DATETIME * | datetime, |
DB_BIGINT | i2, | ||
DB_DATETIME * | result_datetime | ||
) |
Definition at line 4656 of file db_date.c.
References ARG_FILE_LINE, db_datetime::date, DB_BIGINT_MIN, DB_DATE_MAX, DB_DATE_MIN, db_subtract_int_from_datetime(), ER_ERROR_SEVERITY, ER_QPROC_TIME_UNDERFLOW, er_set(), MILLISECONDS_OF_ONE_DAY, NO_ERROR, OR_CHECK_ADD_OVERFLOW, OR_CHECK_INT_OVERFLOW, and db_datetime::time.
Referenced by db_subtract_int_from_datetime(), db_timestamp(), fetch_peek_arith(), pt_evaluate_db_value_expr(), qdata_add_bigint_to_datetime(), qdata_add_int_to_datetime(), qdata_add_short_to_datetime(), tz_datetime_utc_conv(), and tz_utc_datetimetz_to_local().
int db_add_weeks_and_days_to_date | ( | int * | day, |
int * | month, | ||
int * | year, | ||
int | weeks, | ||
int | day_week | ||
) |
Definition at line 5009 of file db_date.c.
References ER_FAILED, i, IS_LEAP_YEAR, NO_ERROR, and NULL.
Referenced by db_str_to_date().
int db_check_time_date_format | ( | const char * | format_s | ) |
Definition at line 4914 of file db_date.c.
References DATE_SPECIFIER, DATETIME_SPECIFIER, DATETIMETZ_SPECIFIER, i, ampm_buf::len, strlen, and TIME_SPECIFIER.
Referenced by db_str_to_date(), and pt_eval_expr_type().
Definition at line 3481 of file db_date.c.
References ARG_FILE_LINE, db_datetime::date, db_date_parse_datetime(), er_clear(), ER_DATE_CONVERSION, ER_ERROR_SEVERITY, er_set(), err, and NO_ERROR.
Referenced by tp_atodate().
int db_date_parse_datetime | ( | char const * | str, |
int | str_len, | ||
DB_DATETIME * | datetime | ||
) |
Definition at line 3423 of file db_date.c.
References db_date_parse_datetime_parts(), and NULL.
Referenced by db_date_parse_date(), db_date_parse_timestamp(), and tp_atoudatetime().
int db_date_parse_datetime_parts | ( | char const * | str, |
int | str_len, | ||
DB_DATETIME * | date, | ||
bool * | is_explicit_time, | ||
bool * | has_explicit_msec, | ||
bool * | fits_as_timestamp, | ||
char const ** | endp | ||
) |
Definition at line 3176 of file db_date.c.
References ARG_FILE_LINE, char_isalpha(), char_isdigit(), char_isspace(), db_datetime::date, db_timestamp_encode_utc(), er_clear(), ER_ERROR_SEVERITY, er_set(), ER_TIMESTAMP_CONVERSION, IGREG_SPECIAL, NO_ERROR, NULL, p, parse_date_separated(), parse_mtime_separated(), parse_timedate_separated(), parse_timestamp_compact(), and db_datetime::time.
Referenced by db_add_time(), db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_date_parse_datetime(), and db_get_datetime_from_dbvalue().
Definition at line 2933 of file db_date.c.
References ARG_FILE_LINE, char_isalpha(), char_isdigit(), char_isspace(), ER_ERROR_SEVERITY, er_set(), ER_TIME_CONVERSION, NO_ERROR, NULL, p, parse_date_separated(), parse_explicit_mtime_compact(), parse_explicit_mtime_separated(), parse_mtime_separated(), and parse_timedate_separated().
Referenced by db_add_time(), db_get_time_from_dbvalue(), and tp_atotime().
int db_date_parse_timestamp | ( | char const * | str, |
int | str_len, | ||
DB_TIMESTAMP * | utime | ||
) |
Definition at line 3438 of file db_date.c.
References ARG_FILE_LINE, db_datetime::date, db_date_parse_datetime(), db_timestamp_encode_ses(), er_clear(), ER_ERROR_SEVERITY, er_set(), ER_TIMESTAMP_CONVERSION, err, IGREG_SPECIAL, NO_ERROR, NULL, and db_datetime::time.
int db_date_to_string | ( | char * | buf, |
int | bufsize, | ||
DB_DATE * | date | ||
) |
Definition at line 3953 of file db_date.c.
References db_date_decode(), and NULL.
Referenced by coerce_date_to_dbvalue(), date_to_char(), db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_timestamp_to_string(), db_timestamptz_to_string(), db_value_get(), db_value_printer::describe_data(), fprint_special_strings(), pt_dbval_to_value(), tp_value_cast_internal(), and valcnv_convert_data_to_string().
int db_date_weekday | ( | DB_DATE * | date | ) |
Definition at line 321 of file db_date.c.
References day_of_week().
Referenced by date_as_string(), db_datetime_string(), db_string_date(), db_timestamp_string(), and fmt_date_value().
int db_datetime_decode | ( | const DB_DATETIME * | datetime, |
int * | month, | ||
int * | day, | ||
int * | year, | ||
int * | hour, | ||
int * | minute, | ||
int * | second, | ||
int * | millisecond | ||
) |
Definition at line 4574 of file db_date.c.
References db_datetime::date, db_date_decode(), decode_mtime(), NO_ERROR, and db_datetime::time.
Referenced by date_to_char(), db_add_time(), db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_date_format(), db_datetime_string(), db_datetime_to_string(), db_datetime_to_string2(), db_get_datetime_from_dbvalue(), db_get_time_from_dbvalue(), db_print_data(), db_string_datetime(), db_string_extract_dbval(), db_time_format(), dbval_to_net_buf(), do_evaluate_default_expr(), ehash_dump_bucket(), fmt_timestamp_value(), jsp_pack_datetime_argument(), ko_time_value(), pt_xasl_data_type_to_domain(), qexec_execute_insert(), round_date(), tp_value_cast_internal(), and us_time_value().
int db_datetime_encode | ( | DB_DATETIME * | datetime, |
int | month, | ||
int | day, | ||
int | year, | ||
int | hour, | ||
int | minute, | ||
int | second, | ||
int | millisecond | ||
) |
Definition at line 4597 of file db_date.c.
References db_datetime::date, db_date_encode(), encode_mtime(), and db_datetime::time.
Referenced by db_add_time(), db_calculate_current_server_time(), db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_datetimetz_to_string(), db_localdatetime_msec(), db_str_to_date(), db_string_datetime(), db_sys_date_and_epoch_time(), db_sys_datetime(), db_timestamp(), db_to_datetime(), dbval_to_net_buf(), fetch_peek_arith(), ldr_init_loader(), netval_to_dbval(), qexec_execute_query(), cubload::to_db_datetime(), cubload::to_db_datetimeltz(), cubload::to_db_datetimetz(), tz_create_datetimetz_from_parts(), tz_full_timezones_start_scan(), tz_get_current_date(), and value_to_db_value().
int db_datetime_to_string | ( | char * | buf, |
int | bufsize, | ||
DB_DATETIME * | datetime | ||
) |
Definition at line 4225 of file db_date.c.
References db_datetime_decode(), and NULL.
Referenced by chksum_report_schema_diff(), csql_db_value_as_string(), date_to_char(), db_add_time(), db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_datetimetz_to_string(), db_value_get(), db_value_printer::describe_data(), fprint_special_strings(), la_log_page_check(), la_print_log_arv_header(), la_print_log_header(), pt_dbval_to_value(), restoreslave(), tp_value_cast_internal(), and valcnv_convert_data_to_string().
int db_datetime_to_string2 | ( | char * | buf, |
int | bufsize, | ||
DB_DATETIME * | datetime | ||
) |
Definition at line 4375 of file db_date.c.
References db_datetime_decode(), and NULL.
Referenced by la_log_page_check().
int db_datetimeltz_to_string | ( | char * | buf, |
int | bufsize, | ||
DB_DATETIME * | dt | ||
) |
Definition at line 4350 of file db_date.c.
References db_datetimetz_to_string(), NO_ERROR, and tz_create_session_tzid_for_datetime().
Referenced by csql_db_value_as_string(), date_to_char(), db_value_printer::describe_data(), fprint_special_strings(), and pt_dbval_to_value().
int db_datetimetz_to_string | ( | char * | buf, |
int | bufsize, | ||
DB_DATETIME * | dt, | ||
const TZ_ID * | tz_id | ||
) |
Definition at line 4302 of file db_date.c.
References db_datetime_encode(), db_datetime_to_string(), er_clear(), ER_QPROC_TIME_UNDERFLOW, NO_ERROR, tz_id_to_str(), and tz_utc_datetimetz_to_local().
Referenced by csql_db_value_as_string(), date_to_char(), db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_datetimeltz_to_string(), db_value_printer::describe_data(), fprint_special_strings(), pt_dbval_to_value(), tp_value_cast_internal(), and valcnv_convert_data_to_string().
int db_get_day_of_week | ( | int | year, |
int | month, | ||
int | day | ||
) |
Definition at line 4723 of file db_date.c.
Referenced by db_date_format(), db_get_date_weekday(), db_str_to_date(), db_to_date(), db_to_datetime(), db_to_timestamp(), get_date_weekday(), get_end_of_week_one_of_year(), and tz_get_first_weekday_around_date().
int db_get_day_of_year | ( | int | year, |
int | month, | ||
int | day | ||
) |
Definition at line 4697 of file db_date.c.
References i, and IS_LEAP_YEAR.
Referenced by db_get_date_dayofyear(), db_get_date_totaldays(), db_get_week_of_year(), and db_time_diff().
int db_get_week_of_year | ( | int | year, |
int | month, | ||
int | day, | ||
int | mode | ||
) |
Definition at line 4854 of file db_date.c.
References assert, db_get_day_of_year(), get_end_of_week_one_of_year(), and IS_LEAP_YEAR.
Referenced by db_get_date_week().
void db_localdatetime | ( | time_t * | epoch_time, |
DB_DATETIME * | datetime | ||
) |
Definition at line 1030 of file db_date.c.
References db_localdatetime_msec().
Referenced by css_make_access_status_exist_user(), css_user_access_status_start_scan(), disk_volume_header_next_scan(), insert_ha_apply_info(), la_get_last_ha_applied_info(), la_print_log_arv_header(), la_print_log_header(), la_update_ha_apply_info_log_record_time(), la_update_ha_last_applied_info(), log_active_log_header_next_scan(), log_archive_log_header_next_scan(), and restoreslave().
void db_localdatetime_msec | ( | time_t * | epoch_time, |
int | millisecond, | ||
DB_DATETIME * | datetime | ||
) |
Definition at line 1044 of file db_date.c.
References db_datetime_encode(), and NULL.
Referenced by db_localdatetime(), logtb_descriptors_start_scan(), and showstmt_array_end_scan().
Definition at line 1000 of file db_date.c.
References encode_time(), julian_encode(), and NULL.
Definition at line 557 of file db_date.c.
References NO_ERROR, and tm_encode().
Referenced by catcls_get_apply_info_log_record_time().
Definition at line 973 of file db_date.c.
References db_tm_encode(), and NO_ERROR.
Referenced by double_to_string(), and pt_xasl_data_type_to_domain().
Definition at line 3629 of file db_date.c.
References char_isspace(), NULL, and parse_date().
Referenced by pt_check_and_coerce_to_date().
Definition at line 1331 of file db_date.c.
References NULL, and parse_mtime().
Referenced by pt_check_and_coerce_to_time().
Definition at line 3693 of file db_date.c.
References db_string_to_date_ex(), and strlen.
Referenced by db_string_value(), jsp_unpack_date_value(), ldr_check_date_time_conversion(), ldr_date_elem(), pt_db_value_initialize(), and cubload::to_db_date().
Definition at line 3661 of file db_date.c.
References ARG_FILE_LINE, char_isspace(), ER_DATE_CONVERSION, er_set(), ER_WARNING_SEVERITY, NO_ERROR, NULL, p, and parse_date().
Referenced by db_string_extract_dbval(), db_string_to_date(), and db_to_date().
int db_string_to_datetime | ( | const char * | str, |
DB_DATETIME * | datetime | ||
) |
Definition at line 4441 of file db_date.c.
References db_string_to_datetime_ex(), and strlen.
Referenced by db_string_value(), jsp_unpack_datetime_value(), ldr_check_date_time_conversion(), ldr_datetime_elem(), pt_db_value_initialize(), and cubload::to_db_datetime().
int db_string_to_datetime_ex | ( | const char * | str, |
int | str_len, | ||
DB_DATETIME * | datetime | ||
) |
Definition at line 4414 of file db_date.c.
References ARG_FILE_LINE, char_isspace(), ER_DATE_CONVERSION, er_set(), ER_WARNING_SEVERITY, NO_ERROR, NULL, p, and parse_datetime().
Referenced by db_string_extract_dbval(), db_string_to_datetime(), and db_to_datetime().
int db_string_to_datetimeltz | ( | const char * | str, |
DB_DATETIME * | datetime | ||
) |
Definition at line 4555 of file db_date.c.
References db_string_to_datetimeltz_ex(), and strlen.
Referenced by ldr_check_date_time_conversion(), ldr_datetimeltz_elem(), pt_db_value_initialize(), and cubload::to_db_datetimeltz().
int db_string_to_datetimeltz_ex | ( | const char * | str, |
int | str_len, | ||
DB_DATETIME * | datetime | ||
) |
Definition at line 4533 of file db_date.c.
References db_datetimetz::datetime, db_string_to_datetimetz_ex(), error(), and NO_ERROR.
Referenced by db_string_to_datetimeltz().
int db_string_to_datetimetz | ( | const char * | str, |
DB_DATETIMETZ * | dt_tz, | ||
bool * | has_zone | ||
) |
Definition at line 4520 of file db_date.c.
References db_string_to_datetimetz_ex(), and strlen.
Referenced by ldr_check_date_time_conversion(), ldr_datetimetz_elem(), pt_db_value_initialize(), and cubload::to_db_datetimetz().
int db_string_to_datetimetz_ex | ( | const char * | str, |
int | str_len, | ||
DB_DATETIMETZ * | dt_tz, | ||
bool * | has_zone | ||
) |
Definition at line 4455 of file db_date.c.
References ARG_FILE_LINE, CAST_BUFLEN, char_isspace(), db_datetimetz::datetime, ER_DATE_CONVERSION, er_set(), ER_WARNING_SEVERITY, NO_ERROR, NULL, p, parse_datetime(), tz_create_datetimetz(), tz_get_session_tz_region(), and db_datetimetz::tz_id.
Referenced by db_add_time(), db_date_add_sub_interval_expr(), db_string_to_datetimeltz_ex(), db_string_to_datetimetz(), db_to_datetime(), and tp_atodatetimetz().
Definition at line 3739 of file db_date.c.
References db_string_to_time_ex(), and strlen.
Referenced by db_string_value(), jsp_unpack_time_value(), ldr_check_date_time_conversion(), ldr_time_elem(), pt_db_value_initialize(), and cubload::to_db_time().
Definition at line 3708 of file db_date.c.
References ARG_FILE_LINE, char_isspace(), ER_DATE_CONVERSION, er_set(), ER_WARNING_SEVERITY, NO_ERROR, NULL, p, and parse_time().
Referenced by db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_string_extract_dbval(), db_string_to_time(), and db_to_time().
int db_string_to_timestamp | ( | const char * | buf, |
DB_TIMESTAMP * | utime | ||
) |
Definition at line 3802 of file db_date.c.
References db_string_to_timestamp_ex(), and strlen.
Referenced by db_string_value(), jsp_unpack_timestamp_value(), ldr_check_date_time_conversion(), ldr_timestamp_elem(), and cubload::to_db_timestamp().
int db_string_to_timestamp_ex | ( | const char * | buf, |
int | buf_len, | ||
DB_TIMESTAMP * | utime | ||
) |
Definition at line 3755 of file db_date.c.
References ARG_FILE_LINE, char_isspace(), db_timestamp_encode_ses(), ER_DATE_CONVERSION, er_set(), ER_WARNING_SEVERITY, err, IGREG_SPECIAL, NO_ERROR, NULL, p, and parse_for_timestamp().
Referenced by db_string_extract_dbval(), db_string_to_timestamp(), and db_to_timestamp().
int db_string_to_timestampltz | ( | const char * | str, |
DB_TIMESTAMP * | ts | ||
) |
Definition at line 3936 of file db_date.c.
References db_string_to_timestampltz_ex(), and strlen.
Referenced by ldr_check_date_time_conversion(), ldr_timestampltz_elem(), pt_db_value_initialize(), and cubload::to_db_timestampltz().
int db_string_to_timestampltz_ex | ( | const char * | str, |
int | str_len, | ||
DB_TIMESTAMP * | ts | ||
) |
Definition at line 3908 of file db_date.c.
References ARG_FILE_LINE, db_string_to_timestamptz_ex(), ER_DATE_CONVERSION, er_set(), ER_WARNING_SEVERITY, error(), NO_ERROR, and db_timestamptz::timestamp.
Referenced by db_string_to_timestampltz().
int db_string_to_timestamptz | ( | const char * | str, |
DB_TIMESTAMPTZ * | ts_tz, | ||
bool * | has_zone | ||
) |
Definition at line 3894 of file db_date.c.
References db_string_to_timestamptz_ex(), and strlen.
Referenced by ldr_check_date_time_conversion(), ldr_timestamptz_elem(), pt_db_value_initialize(), and cubload::to_db_timestamptz().
int db_string_to_timestamptz_ex | ( | const char * | str, |
int | str_len, | ||
DB_TIMESTAMPTZ * | ts_tz, | ||
bool * | has_zone, | ||
bool | is_cast | ||
) |
Definition at line 3820 of file db_date.c.
References ARG_FILE_LINE, assert, CAST_BUFLEN, char_isspace(), ER_DATE_CONVERSION, er_set(), ER_WARNING_SEVERITY, err, NO_ERROR, NULL, p, parse_for_timestamp(), tz_create_timestamptz(), tz_get_session_tz_region(), and db_timestamptz::tz_id.
Referenced by db_string_to_timestampltz_ex(), db_string_to_timestamptz(), db_to_timestamp(), and tp_atotimestamptz().
int db_subtract_int_from_datetime | ( | DB_DATETIME * | dt1, |
DB_BIGINT | i2, | ||
DB_DATETIME * | result_datetime | ||
) |
Definition at line 4612 of file db_date.c.
References ARG_FILE_LINE, db_datetime::date, db_add_int_to_datetime(), DB_BIGINT_MIN, DB_DATE_MAX, DB_DATE_MIN, ER_ERROR_SEVERITY, ER_QPROC_TIME_UNDERFLOW, er_set(), MILLISECONDS_OF_ONE_DAY, NO_ERROR, OR_CHECK_INT_OVERFLOW, OR_CHECK_SUB_UNDERFLOW, and db_datetime::time.
Referenced by db_add_int_to_datetime(), db_timestamp(), pt_evaluate_db_value_expr(), and qdata_subtract_datetime_to_int().
int db_time_to_string | ( | char * | buf, |
int | bufsize, | ||
DB_TIME * | dbtime | ||
) |
Definition at line 3994 of file db_date.c.
References db_time_decode(), min, and NULL.
Referenced by csql_db_value_as_string(), date_to_char(), db_add_time(), db_timestamp_to_string(), db_timestamptz_to_string(), db_value_get(), db_value_printer::describe_data(), fprint_special_strings(), pt_dbval_to_value(), tp_value_cast_internal(), and valcnv_convert_data_to_string().
int db_timestamp_decode_ses | ( | const DB_TIMESTAMP * | utime, |
DB_DATE * | date, | ||
DB_TIME * | timeval | ||
) |
Definition at line 764 of file db_date.c.
References db_timestamp_decode_w_reg(), and tz_get_session_tz_region().
Referenced by cnv_valid_currency(), coerce_timestamp_to_dbvalue(), date_to_char(), db_date_format(), db_get_datetime_from_dbvalue(), db_get_time_from_dbvalue(), db_string_extract_dbval(), db_string_timestamp(), db_time_format(), db_timestamp_string(), db_timestamp_to_string(), db_trunc_dbval(), db_value_to_value(), dbval_to_net_buf(), ehash_dump_bucket(), fmt_timestamp_string(), jsp_pack_timestamp_argument(), ko_time_value(), qdata_add_bigint_to_utime(), qdata_add_int_to_utime(), qdata_add_short_to_utime(), qdata_subtract_datetime_to_dbval(), qdata_subtract_utime_to_dbval(), round_date(), tp_value_cast_internal(), tp_value_coerce_strict(), and us_time_value().
void db_timestamp_decode_utc | ( | const DB_TIMESTAMP * | utime, |
DB_DATE * | date, | ||
DB_TIME * | timeval | ||
) |
Definition at line 781 of file db_date.c.
References assert, encode_time(), IGREG_SPECIAL, julian_encode(), NULL, and tz_timestamp_decode_sec().
Referenced by db_add_time(), db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_timestamp_decode_w_reg(), db_timestamp_decode_w_tz_id(), qdata_interpolation_function_values(), qdata_subtract_datetimetz_to_dbval(), qdata_subtract_timestamptz_to_dbval(), qdata_subtract_utime_to_dbval(), tp_value_cast_internal(), tp_value_coerce_strict(), tz_create_session_tzid_for_timestamp(), and tz_timestamptz_fix_zone().
int db_timestamp_decode_w_reg | ( | const DB_TIMESTAMP * | utime, |
const TZ_REGION * | tz_region, | ||
DB_DATE * | date, | ||
DB_TIME * | timeval | ||
) |
Definition at line 828 of file db_date.c.
References db_datetime::date, db_timestamp_decode_utc(), err, IGREG_SPECIAL, NO_ERROR, NULL, db_datetime::time, tz_conv_tz_datetime_w_region(), tz_get_utc_tz_region(), and TZ_IS_UTC_TZ_REGION.
Referenced by db_timestamp_decode_ses().
int db_timestamp_decode_w_tz_id | ( | const DB_TIMESTAMP * | utime, |
const TZ_ID * | tz_id, | ||
DB_DATE * | date, | ||
DB_TIME * | timeval | ||
) |
Definition at line 902 of file db_date.c.
References db_datetime::date, db_timestamp_decode_utc(), err, IGREG_SPECIAL, NO_ERROR, NULL, db_datetime::time, and tz_utc_datetimetz_to_local().
Referenced by conv_tz(), date_to_char(), db_date_format(), db_get_datetime_from_dbvalue(), db_get_time_from_dbvalue(), db_string_extract_dbval(), db_time_format(), db_timestamptz_to_string(), db_trunc_dbval(), dbval_to_net_buf(), qdata_add_bigint_to_timestamptz(), qdata_add_int_to_timestamptz(), qdata_add_short_to_timestamptz(), qdata_subtract_timestamptz_to_dbval(), round_date(), tp_value_cast_internal(), and tp_value_coerce_strict().
int db_timestamp_encode | ( | DB_TIMESTAMP * | utime, |
DB_DATE * | date, | ||
DB_TIME * | timeval | ||
) |
Definition at line 579 of file db_date.c.
References db_timestamp_encode_ses(), and NULL.
Referenced by db_unix_timestamp().
int db_timestamp_encode_ses | ( | const DB_DATE * | date, |
const DB_TIME * | timeval, | ||
DB_TIMESTAMP * | utime, | ||
TZ_ID * | dest_tz_id | ||
) |
Definition at line 597 of file db_date.c.
References db_timestamp_encode_w_reg(), and tz_get_session_tz_region().
Referenced by coerce_datetime_to_dbvalue(), db_date_parse_timestamp(), db_datetime_string(), db_datetime_to_timestamp(), db_string_timestamp(), db_string_to_timestamp_ex(), db_timestamp_encode(), db_to_timestamp(), fetch_peek_arith(), netval_to_dbval(), pt_evaluate_db_value_expr(), tp_value_cast_internal(), tp_value_coerce_strict(), and value_to_db_value().
int db_timestamp_encode_sys | ( | const DB_DATE * | date, |
const DB_TIME * | timeval, | ||
DB_TIMESTAMP * | utime, | ||
TZ_ID * | dest_tz_id | ||
) |
Definition at line 617 of file db_date.c.
References db_timestamp_encode_w_reg(), and tz_get_system_tz_region().
Referenced by do_evaluate_default_expr(), fetch_peek_arith(), pt_evaluate_db_value_expr(), and qexec_execute_insert().
int db_timestamp_encode_utc | ( | const DB_DATE * | date, |
const DB_TIME * | timeval, | ||
DB_TIMESTAMP * | utime | ||
) |
Definition at line 635 of file db_date.c.
References ARG_FILE_LINE, assert, decode_time(), ER_DATE_CONVERSION, er_set(), ER_WARNING_SEVERITY, IGREG_SPECIAL, IS_LEAP_YEAR, julian_decode(), min, NO_ERROR, NULL, OR_CHECK_INT_OVERFLOW, TZ_MON_FEB, TZ_MON_JAN, and tz_timestamp_encode_leap_sec_adj().
Referenced by conv_tz(), db_date_parse_datetime_parts(), db_timestamp_encode_w_reg(), db_unix_timestamp(), qdata_interpolation_function_values(), tp_value_cast_internal(), tp_value_coerce_strict(), tz_create_timestamptz(), tz_create_timestamptz_from_offset(), tz_create_timestamptz_from_zoneid_and_tzd(), and tz_timestamptz_fix_zone().
int db_timestamp_to_string | ( | char * | buf, |
int | bufsize, | ||
DB_TIMESTAMP * | utime | ||
) |
Definition at line 4054 of file db_date.c.
References db_date_to_string(), db_time_to_string(), and db_timestamp_decode_ses().
Referenced by date_to_char(), db_value_get(), fprint_special_strings(), tp_value_cast_internal(), and valcnv_convert_data_to_string().
int db_timestampltz_to_string | ( | char * | buf, |
int | bufsize, | ||
DB_TIMESTAMP * | utime | ||
) |
Definition at line 4146 of file db_date.c.
References db_timestamptz_to_string(), err, NO_ERROR, and tz_create_session_tzid_for_timestamp().
Referenced by csql_db_value_as_string(), date_to_char(), db_value_printer::describe_data(), fprint_special_strings(), and pt_dbval_to_value().
int db_timestamptz_to_string | ( | char * | buf, |
int | bufsize, | ||
DB_TIMESTAMP * | utime, | ||
const TZ_ID * | tz_id | ||
) |
Definition at line 4090 of file db_date.c.
References db_date_to_string(), db_time_to_string(), db_timestamp_decode_w_tz_id(), err, NO_ERROR, and tz_id_to_str().
Referenced by csql_db_value_as_string(), date_to_char(), db_timestampltz_to_string(), db_value_printer::describe_data(), fprint_special_strings(), pt_dbval_to_value(), tp_value_cast_internal(), and valcnv_convert_data_to_string().
Definition at line 536 of file db_date.c.
References tm_encode().
Referenced by db_set_base_server_time(), and db_strftime().
bool is_leap_year | ( | int | year | ) |
void julian_decode | ( | int | jul, |
int * | monthp, | ||
int * | dayp, | ||
int * | yearp, | ||
int * | weekp | ||
) |
Definition at line 196 of file db_date.c.
References IGREG2, IGREG_SPECIAL, and NULL.
Referenced by db_add_days_to_year(), db_date_decode(), db_date_encode(), db_get_date_from_days(), db_timestamp_encode_utc(), get_saving_time_from_offset_rule(), parse_date(), parse_date_separated(), parse_explicit_mtime_compact(), parse_timestamp_compact(), tm_encode(), tz_datetime_utc_conv(), and tzc_check_ds_ruleset().
int julian_encode | ( | int | m, |
int | d, | ||
int | y | ||
) |
Definition at line 113 of file db_date.c.
Referenced by comp_func_raw_offset_rules(), copy_offset_rule(), db_add_days_to_year(), db_date_encode(), db_get_date_from_days(), db_localtime(), db_new_time(), db_timestamp_decode_utc(), fetch_peek_arith(), get_day(), parse_date(), parse_date_separated(), parse_explicit_mtime_compact(), parse_timestamp_compact(), pt_evaluate_db_value_expr(), round_date(), tz_get_ds_change_julian_date_diff(), tzc_check_ds_ruleset(), and tzc_export_timezone_dot_c().