MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / CVT_get_timestamp

Function CVT_get_timestamp

src/jrd/cvt.cpp:407–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405
406
407GDS_TIMESTAMP CVT_get_timestamp(const dsc* desc)
408{
409/**************************************
410 *
411 * C V T _ g e t _ t i m e s t a m p
412 *
413 **************************************
414 *
415 * Functional description
416 * Convert something arbitrary to a SQL timestamp
417 *
418 **************************************/
419 if (desc->dsc_dtype == dtype_timestamp)
420 return *((GDS_TIMESTAMP *) desc->dsc_address);
421
422 DSC temp_desc;
423 GDS_TIMESTAMP value;
424 memset(&temp_desc, 0, sizeof(temp_desc));
425 temp_desc.dsc_dtype = dtype_timestamp;
426 temp_desc.dsc_address = (UCHAR *) &value;
427 CVT_move(desc, &temp_desc, 0);
428 return value;
429}
430
431
432ISC_TIMESTAMP_TZ CVT_get_timestamp_tz(const dsc* desc)

Callers 1

MOV_get_timestampFunction · 0.85

Calls 1

CVT_moveFunction · 0.70

Tested by

no test coverage detected