Take the input value, which is either a timestamp or a string representing a timestamp. Convert it to a timestamp, and then return that timestamp as a count of isc_ticks since the base date and time in MJD time arithmetic. ISC_TICKS or isc_ticks are actually deci - milli seconds or tenthousandth of seconds per day. This is derived from the ISC_TIME_SECONDS_PRECISION.
| 13996 | // ISC_TICKS or isc_ticks are actually deci - milli seconds or tenthousandth of seconds per day. |
| 13997 | // This is derived from the ISC_TIME_SECONDS_PRECISION. |
| 13998 | static SINT64 getTimeStampToIscTicks(thread_db* tdbb, const dsc* d) |
| 13999 | { |
| 14000 | dsc result; |
| 14001 | ISC_TIMESTAMP_TZ result_timestamp; |
| 14002 | |
| 14003 | result.dsc_dtype = d->isDateTimeTz() ? dtype_timestamp_tz : dtype_timestamp; |
| 14004 | result.dsc_scale = 0; |
| 14005 | result.dsc_flags = 0; |
| 14006 | result.dsc_sub_type = 0; |
| 14007 | result.dsc_length = d->isDateTimeTz() ? sizeof(ISC_TIMESTAMP_TZ) : sizeof(ISC_TIMESTAMP); |
| 14008 | result.dsc_address = reinterpret_cast<UCHAR*>(&result_timestamp); |
| 14009 | |
| 14010 | CVT_move(d, &result, tdbb->getAttachment()->att_dec_status); |
| 14011 | |
| 14012 | return TimeStamp::timeStampToTicks(result_timestamp.utc_timestamp); |
| 14013 | } |
| 14014 | |
| 14015 | // One of d1, d2 is time, the other is date |
| 14016 | static bool isDateAndTime(const dsc& d1, const dsc& d2) |
no test coverage detected