OmniSciDB  04ee39c94c
DateConverters Namespace Reference

Functions

int64_t get_epoch_days_from_seconds (const int64_t seconds)
 
int64_t get_epoch_seconds_from_days (const int64_t days)
 

Function Documentation

◆ get_epoch_days_from_seconds()

int64_t DateConverters::get_epoch_days_from_seconds ( const int64_t  seconds)
inline

Definition at line 24 of file DateConverters.h.

References kSecsPerDay.

Referenced by DateDaysEncoder< T, V >::appendData(), ArrowResultSetConverter::appendToColumnBuilder(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), random_fill_dates(), TEST(), and DateDaysOverflowValidator::validate().

24  {
25  return (seconds < 0 && seconds % kSecsPerDay != 0) ? (seconds / kSecsPerDay) - 1
26  : seconds / kSecsPerDay;
27 }
static constexpr int64_t kSecsPerDay
+ Here is the caller graph for this function:

◆ get_epoch_seconds_from_days()

int64_t DateConverters::get_epoch_seconds_from_days ( const int64_t  days)
inline

Definition at line 29 of file DateConverters.h.

References kSecsPerDay.

Referenced by DateDaysEncoder< T, V >::appendData(), Fragmenter_Namespace::DateChunkConverter< BUFFER_DATA_TYPE >::convertToColumnarFormat(), TEST(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumn().

29  {
30  return days * kSecsPerDay;
31 }
static constexpr int64_t kSecsPerDay
+ Here is the caller graph for this function: