Skip to main content

MYSQL_ZERO_TIMESTAMP

Constant MYSQL_ZERO_TIMESTAMP 

Source
const MYSQL_ZERO_TIMESTAMP: &str = "0000-00-00 00:00:00";
Expand description

Canonical text for the MySQL zero-date sentinel (‘0000-00-00 00:00:00’). In binlog MYSQL_TYPE_DATETIME/MYSQL_TYPE_DATETIME2 encodings, sec=0 cannot represent unix epoch 0. The TIMESTAMP type’s supported range starts at ‘1970-01-01 00:00:01’ UTC (https://dev.mysql.com/doc/refman/8.0/en/datetime.html), so any sec=0 is unambiguously this sentinel.