mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
Merge pull request #43466 from zzsmdfj/issue_42742_fix_date_diff_wrong_result_build_by_darwin
Fix date_diff() for hour/minute on macOS
This commit is contained in:
commit
3869a6c8f1
@ -1190,9 +1190,9 @@ struct ToRelativeHourNumImpl
|
||||
static inline UInt32 execute(UInt32 t, const DateLUTImpl & time_zone)
|
||||
{
|
||||
if constexpr (precision_ == ResultPrecision::Extended)
|
||||
return static_cast<UInt32>(time_zone.toStableRelativeHourNum(static_cast<time_t>(t)));
|
||||
return static_cast<UInt32>(time_zone.toStableRelativeHourNum(static_cast<DateLUTImpl::Time>(t)));
|
||||
else
|
||||
return static_cast<UInt32>(time_zone.toRelativeHourNum(static_cast<time_t>(t)));
|
||||
return static_cast<UInt32>(time_zone.toRelativeHourNum(static_cast<DateLUTImpl::Time>(t)));
|
||||
}
|
||||
static inline auto execute(Int32 d, const DateLUTImpl & time_zone)
|
||||
{
|
||||
@ -1226,7 +1226,7 @@ struct ToRelativeMinuteNumImpl
|
||||
}
|
||||
static inline UInt32 execute(UInt32 t, const DateLUTImpl & time_zone)
|
||||
{
|
||||
return static_cast<UInt32>(time_zone.toRelativeMinuteNum(static_cast<time_t>(t)));
|
||||
return static_cast<UInt32>(time_zone.toRelativeMinuteNum(static_cast<DateLUTImpl::Time>(t)));
|
||||
}
|
||||
static inline auto execute(Int32 d, const DateLUTImpl & time_zone)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user