`toUnixTimestamp64*()` functions treat milli-, micro- and nanoseconds in a wrong way when timestamp is negative, for example:

```sql
SELECT toUnixTimestamp64Milli(toDateTime64('1927-01-01 00:00:00', 0, 'Europe/Zurich'))

┌─toUnixTimestamp64Milli(toDateTime64('1927-01-01 00:00:00', 0, 'Europe/Zurich'))─┐
│                                                                  -1357002000000 │
└─────────────────────────────────────────────────────────────────────────────────┘


SELECT toUnixTimestamp64Milli(toDateTime64('1927-01-01 00:00:00.123', 3, 'Europe/Zurich'))

┌─toUnixTimestamp64Milli(toDateTime64('1927-01-01 00:00:00.123', 3, 'Europe/Zurich'))─┐
│                                                                      -1357002000123 │
└─────────────────────────────────────────────────────────────────────────────────────┘
```
(In the case above, the first timestamp must be less than the second)

Comparison doesn't work properly either:

```sql
SELECT toDateTime64('1969-12-12 12:12:12.13', 2) > toDateTime64('1969-12-12 12:12:12.12', 2)

┌─greater(toDateTime64('1969-12-12 12:12:12.13', 2), toDateTime64('1969-12-12 12:12:12.12', 2))─┐
│                                                                                             0 │
└───────────────────────────────────────────────────────────────────────────────────────────────┘

SELECT toDateTime64('1979-12-12 12:12:12.13', 2) > toDateTime64('1979-12-12 12:12:12.12', 2)

┌─greater(toDateTime64('1979-12-12 12:12:12.13', 2), toDateTime64('1979-12-12 12:12:12.12', 2))─┐
│                                                                                             1 │
└───────────────────────────────────────────────────────────────────────────────────────────────┘
```

ClickHouse version 22.2.2.1
{
    readDateTimeTextImpl<void>(datetime64, scale, buf, date_lut);
}
inline bool tryReadDateTimeText(time_t & datetime, ReadBuffer & buf, const DateLUTImpl & time_zone = DateLUT::instance())
{
    return readDateTimeTextImpl<bool>(datetime, buf, time_zone);
}
inline bool tryReadDateTime64Text(DateTime64 & datetime64, UInt32 scale, ReadBuffer & buf, const DateLUTImpl & date_lut = DateLUT::instance())
{
    return readDateTimeTextImpl<bool>(datetime64, scale, buf, date_lut);
}
inline void readDateTimeText(LocalDateTime & datetime, ReadBuffer & buf)
{
    char s[19];
    size_t size = buf.read(s, 19);
    if (19 != size)
    {
        s[size] = 0;
        throw ParsingException(std::string("Cannot parse datetime ") + s, ErrorCodes::CANNOT_PARSE_DATETIME);
    }
    datetime.year((s[0] - '0') * 1000 + (s[1] - '0') * 100 + (s[2] - '0') * 10 + (s[3] - '0'));
    datetime.month((s[5] - '0') * 10 + (s[6] - '0'));
    datetime.day((s[8] - '0') * 10 + (s[9] - '0'));
    datetime.hour((s[11] - '0') * 10 + (s[12] - '0'));
    datetime.minute((s[14] - '0') * 10 + (s[15] - '0'));
    datetime.second((s[17] - '0') * 10 + (s[18] - '0'));
}
template <typename T>
requires is_arithmetic_v<T>
inline void readBinary(T & x, ReadBuffer & buf) { readPODBinary(x, buf); }