// Decode timestamp into UNIX datetime structure void TimeStamp::decode(struct tm* times, int* fractions) const { fb_assert(mValue.timestamp_date != BAD_DATE); fb_assert(mValue.timestamp_time != BAD_TIME); decode_timestamp(mValue, times, fractions); }
static SCM pg_decode(char *string, int dtype) { switch (dtype) { case 701: case 1700: case 700: return scm_from_double(atof(string)); case 20: case 21: case 23: return scm_from_signed_integer(atoi(string)); case 1114: case 1184: case 1082: return decode_timestamp(string); case 16: case 1000: return (string[0] == 't' ? SCM_BOOL_T : SCM_BOOL_F); } return safe_from_utf8(string); }
static SCM decode_ts(SCM ts) { return decode_timestamp(scm_to_locale_string(ts)); }