mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
c7863e1ac6
* Attempt to enable identifier naming check * Attempt to enable identifier naming check, continue * Progress on identifier names * Adopt identifier names check * Fixed error * Merge with master * Fixed build * Fixed build * Fixed build * Fixed build * Fixed build * Fixed error * Fixed error * Fixed error
21 lines
616 B
C++
21 lines
616 B
C++
#include <iostream>
|
||
#include <common/DateLUT.h>
|
||
|
||
|
||
int main(int, char **)
|
||
{
|
||
/** В DateLUT был глюк - для времён из дня 1970-01-01, возвращался номер часа больше 23. */
|
||
static const time_t time = 66130;
|
||
|
||
const auto & date_lut = DateLUT::instance();
|
||
|
||
std::cerr << date_lut.toHour(time) << std::endl;
|
||
std::cerr << date_lut.toDayNum(time) << std::endl;
|
||
|
||
const auto * values = reinterpret_cast<const DateLUTImpl::Values *>(&date_lut);
|
||
|
||
std::cerr << values[0].date << ", " << time_t(values[1].date - values[0].date) << std::endl;
|
||
|
||
return 0;
|
||
}
|