Repository: marshmallow-code/marshmallow

Issue:
timestamp 0 is not valid for DateTime('timestamp')
0 is a valid timestamp, however, an error occurs during parsing

code example:
```python
from marshmallow import fields, Schema


class A(Schema):
    x = fields.DateTime('timestamp')


a = A().load({"x": 0})
print(a)
```
expected:
```python
{'x': datetime.datetime(1970, 1, 1, 0, 0)}
```
actual
```
marshmallow.exceptions.ValidationError: {'x': ['Not a valid datetime.']}
```
[bug line](https://github.com/marshmallow-code/marshmallow/blob/656ef145270db8667e7d945453ba1e85ad0c587e/src/marshmallow/fields.py#L1286)

Discussion:

Patch:
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py
index 42e529c9..ceb32aa9 100644
--- a/src/marshmallow/fields.py
+++ b/src/marshmallow/fields.py
@@ -1285,8 +1285,6 @@ class DateTime(Field):
         return value.strftime(data_format)
 
     def _deserialize(self, value, attr, data, **kwargs) -> dt.datetime:
-        if not value:  # Falsy values, e.g. '', None, [] are not valid
-            raise self.make_error("invalid", input=value, obj_type=self.OBJ_TYPE)
         data_format = self.format or self.DEFAULT_FORMAT
         func = self.DESERIALIZATION_FUNCS.get(data_format)
         try:
diff --git a/src/marshmallow/utils.py b/src/marshmallow/utils.py
index 1194bb3a..a5fe7262 100644
--- a/src/marshmallow/utils.py
+++ b/src/marshmallow/utils.py
@@ -192,6 +192,8 @@ def from_iso_date(value):
 
 
 def from_timestamp(value: typing.Any) -> dt.datetime:
+    if value is True or value is False:
+        raise ValueError("Not a valid POSIX timestamp")
     value = float(value)
     if value < 0:
         raise ValueError("Not a valid POSIX timestamp")


Test patch:
diff --git a/tests/test_deserialization.py b/tests/test_deserialization.py
index 6c32fead..442b5efb 100644
--- a/tests/test_deserialization.py
+++ b/tests/test_deserialization.py
@@ -422,6 +422,9 @@ class TestFieldDeserialization:
         [
             "not-a-datetime",
             42,
+            True,
+            False,
+            0,
             "",
             [],
             "2018",
@@ -576,7 +579,7 @@ class TestFieldDeserialization:
     @pytest.mark.parametrize("fmt", ["timestamp", "timestamp_ms"])
     @pytest.mark.parametrize(
         "in_value",
-        ["", "!@#", 0, -1, dt.datetime(2013, 11, 10, 1, 23, 45)],
+        ["", "!@#", -1, dt.datetime(2013, 11, 10, 1, 23, 45)],
     )
     def test_invalid_timestamp_field_deserialization(self, fmt, in_value):
         field = fields.DateTime(format=fmt)