diff --git a/CHANGES.rst b/CHANGES.rst
index b483525..e9e31d1 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,10 @@ Changelog
 
 - Nothing changed yet.
 
+- Change pickle format to export the microseconds as an int, to
+  solve a problem with dates after 2038.
+  (`#56 <https://github.com/zopefoundation/DateTime/issues/56>`_)
+
 
 5.4 (2023-12-15)
 ----------------
diff --git a/src/DateTime/DateTime.py b/src/DateTime/DateTime.py
index 8e1ec6d..fc289e6 100644
--- a/src/DateTime/DateTime.py
+++ b/src/DateTime/DateTime.py
@@ -446,17 +446,19 @@ class DateTime:
             raise SyntaxError('Unable to parse {}, {}'.format(args, kw))
 
     def __getstate__(self):
-        # We store a float of _micros, instead of the _micros long, as we most
-        # often don't have any sub-second resolution and can save those bytes
-        return (self._micros / 1000000.0,
+        return (self._micros,
                 getattr(self, '_timezone_naive', False),
                 self._tz)
 
     def __setstate__(self, value):
         if isinstance(value, tuple):
-            self._parse_args(value[0], value[2])
-            self._micros = long(value[0] * 1000000)
-            self._timezone_naive = value[1]
+            micros, tz_naive, tz = value
+            if isinstance(micros, float):
+                # BBB: support for pickle where micros was a float
+                micros = int(micros * 1000000)
+            self._parse_args(micros / 1000000., tz)
+            self._micros = micros
+            self._timezone_naive = tz_naive
         else:
             for k, v in value.items():
                 if k in self.__slots__:

diff --git a/src/DateTime/tests/test_datetime.py b/src/DateTime/tests/test_datetime.py
index ae67d45..f4c2644 100644
--- a/src/DateTime/tests/test_datetime.py
+++ b/src/DateTime/tests/test_datetime.py
@@ -338,6 +338,24 @@ class DateTimeTests(unittest.TestCase):
         for key in DateTime.__slots__:
             self.assertEqual(getattr(dt, key), getattr(new, key))
 
+    def test_pickle_dates_after_2038(self):
+        dt = DateTime('2039/09/02 07:07:6.235027 GMT+1')
+        data = pickle.dumps(dt, 1)
+        new = pickle.loads(data)
+        for key in DateTime.__slots__:
+            self.assertEqual(getattr(dt, key), getattr(new, key))
+
+    def test_pickle_old_with_micros_as_float(self):
+        dt = DateTime('2002/5/2 8:00am GMT+0')
+        data = (
+            'ccopy_reg\n_reconstructor\nq\x00(cDateTime.DateTime\nDateTime'
+            '\nq\x01c__builtin__\nobject\nq\x02Ntq\x03Rq\x04(GA\xcehy\x00\x00'
+            '\x00\x00I00\nX\x05\x00\x00\x00GMT+0q\x05tq\x06b.')
+        data = data.encode('latin-1')
+        new = pickle.loads(data)
+        for key in DateTime.__slots__:
+            self.assertEqual(getattr(dt, key), getattr(new, key))
+
     def testTZ2(self):
         # Time zone manipulation test 2
         dt = DateTime()

tests fail in 2038
## BUG/PROBLEM REPORT / FEATURE REQUEST

<!--

Please do not report security-related issues here. Report them by email to security@plone.org. The Security Team will contact the relevant maintainer if necessary.

Include tracebacks, screenshots, code of debugging sessions or code that reproduces the issue if possible.
The best reproductions are in plain Zope installations without addons or at least with minimal needed addons installed.

-->

### What I did:

<!-- Enter a reproducible description, including preconditions. -->

```
osc co openSUSE:Factory/python-DateTime && cd $_
osc build --vm-type=kvm --noservice --clean --build-opt=--vm-custom-opt="-rtc base=2039-09-02T06:07:00" --alternative-project=home:bmwiedemann:reproducible openSUSE_Tumbleweed
```

### What I expect to happen:

tests should keep working in the future (at least 16 years)

### What actually happened:

similar to issue #41 in that there is a rounding error in `DateTime-5.2` that can randomly break a test.

```
 =================================== FAILURES ===================================
 __________________________ DateTimeTests.test_pickle ___________________________
 
 self = <DateTime.tests.test_datetime.DateTimeTests testMethod=test_pickle>
 
     def test_pickle(self):
         dt = DateTime()
         data = pickle.dumps(dt, 1)
         new = pickle.loads(data)
         for key in DateTime.__slots__:
 >           self.assertEqual(getattr(dt, key), getattr(new, key))
 E           AssertionError: 2198556426235027 != 2198556426235026
 
 src/DateTime/tests/test_datetime.py:253: AssertionError
 =============================== warnings summary ===============================
```

### What version of Python and Zope/Addons I am using:

openSUSE-Tumbleweed-20230729 python3.10

<!-- Enter Operating system, Python and Zope versions you are using -->

src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle_dates_after_2038
src/DateTime/tests/test_datetime.py::DateTimeTests::testAddPrecision src/DateTime/tests/test_datetime.py::DateTimeTests::testBasicTZ src/DateTime/tests/test_datetime.py::DateTimeTests::testBug1203 src/DateTime/tests/test_datetime.py::DateTimeTests::testConsistentSecondMicroRounding src/DateTime/tests/test_datetime.py::DateTimeTests::testConstructor3 src/DateTime/tests/test_datetime.py::DateTimeTests::testConstructor4 src/DateTime/tests/test_datetime.py::DateTimeTests::testConstructor5 src/DateTime/tests/test_datetime.py::DateTimeTests::testConstructor6 src/DateTime/tests/test_datetime.py::DateTimeTests::testConstructor7 src/DateTime/tests/test_datetime.py::DateTimeTests::testConversions src/DateTime/tests/test_datetime.py::DateTimeTests::testCopyConstructor src/DateTime/tests/test_datetime.py::DateTimeTests::testCopyConstructorPreservesTimezone src/DateTime/tests/test_datetime.py::DateTimeTests::testDSTInEffect src/DateTime/tests/test_datetime.py::DateTimeTests::testDSTNotInEffect src/DateTime/tests/test_datetime.py::DateTimeTests::testDayOfWeek src/DateTime/tests/test_datetime.py::DateTimeTests::testEDTTimezone src/DateTime/tests/test_datetime.py::DateTimeTests::testISO8601 src/DateTime/tests/test_datetime.py::DateTimeTests::testInternationalDateformat src/DateTime/tests/test_datetime.py::DateTimeTests::testJulianWeek src/DateTime/tests/test_datetime.py::DateTimeTests::testOldDate src/DateTime/tests/test_datetime.py::DateTimeTests::testParseISO8601 src/DateTime/tests/test_datetime.py::DateTimeTests::testRFC822 src/DateTime/tests/test_datetime.py::DateTimeTests::testStrftimeFarDates src/DateTime/tests/test_datetime.py::DateTimeTests::testStrftimeStr src/DateTime/tests/test_datetime.py::DateTimeTests::testStrftimeTZhandling src/DateTime/tests/test_datetime.py::DateTimeTests::testSubtraction src/DateTime/tests/test_datetime.py::DateTimeTests::testTZ1add src/DateTime/tests/test_datetime.py::DateTimeTests::testTZ1diff src/DateTime/tests/test_datetime.py::DateTimeTests::testTZ1sub src/DateTime/tests/test_datetime.py::DateTimeTests::testTZ2 src/DateTime/tests/test_datetime.py::DateTimeTests::testTZDiffDaylight src/DateTime/tests/test_datetime.py::DateTimeTests::testTimezoneNaiveHandling src/DateTime/tests/test_datetime.py::DateTimeTests::testY10KDate src/DateTime/tests/test_datetime.py::DateTimeTests::testZoneInFarDates src/DateTime/tests/test_datetime.py::DateTimeTests::test_calcTimezoneName src/DateTime/tests/test_datetime.py::DateTimeTests::test_compare_methods src/DateTime/tests/test_datetime.py::DateTimeTests::test_compare_methods_none src/DateTime/tests/test_datetime.py::DateTimeTests::test_format src/DateTime/tests/test_datetime.py::DateTimeTests::test_interface src/DateTime/tests/test_datetime.py::DateTimeTests::test_intl_format_hyphen src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle_asdatetime_with_tz src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle_old src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle_old_with_micros_as_float src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle_old_without_micros src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle_with_micros src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle_with_numerical_tz src/DateTime/tests/test_datetime.py::DateTimeTests::test_pickle_with_tz src/DateTime/tests/test_datetime.py::DateTimeTests::test_security src/DateTime/tests/test_datetime.py::DateTimeTests::test_tzoffset src/DateTime/tests/test_datetime.py::test_suite