
select toDateTime64(-86400 ,9,'UTC') ==  1969-12-31 00:00:00.000000000

select toDateTime64(-86400.00 ,9,'UTC') ==  1970-01-01 00:00:00.000000000 


However, I expect both outputs to be same. 

Version affected : 22.8
bool isDeterministic() const override { return true; }
    bool isDeterministicInScopeOfQuery() const override { return true; }
    bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & ) const override { return true; }
    bool hasInformationAboutMonotonicity() const override
    {
        return static_cast<bool>(monotonicity_for_range);
    }
    Monotonicity getMonotonicityForRange(const IDataType & type, const Field & left, const Field & right) const override
    {
        return monotonicity_for_range(type, left, right);
    }
private:
    const char * cast_name;
    MonotonicityForRange monotonicity_for_range;
    DataTypes argument_types;
    DataTypePtr return_type;
    std::optional<Diagnostic> diagnostic;
    CastType cast_type;
    bool cast_ipv4_ipv6_default_on_conversion_error;
    static WrapperType createFunctionAdaptor(FunctionPtr function, const DataTypePtr & from_type)