Repository: django-import-export/django-import-export (language: python)

Issue:
Excel does not support timezones in datetimes. The tzinfo in the datetime/time object must be set to None.
**Describe the bug**
Updating an existing Django project from `django-import-export` from 4.1.1 to 4.2 raises the following exception while using the admin export action for models having `datetime` fields.
```
Traceback (most recent call last):
  File "c:\Program Files\Python311\Lib\wsgiref\handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\contrib\staticfiles\handlers.py", line 80, in __call__
    return self.application(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\wsgi.py", line 124, in __call__
    response = self.get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\base.py", line 140, in get_response
    response = self._middleware_chain(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Workspace\test\src\test\core\middleware.py", line 42, in __call__
    return self.get_response(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Workspace\test\src\test\core\middleware.py", line 54, in __call__
    response = self.get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Workspace\test\src\test\core\middleware.py", line 85, in __call__
    return self.get_response(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Workspace\test\src\test\core\middleware.py", line 170, in __call__
    return self.get_response(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Workspace\test\src\test\core\middleware.py", line 135, in __call__
    return self.get_response(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Workspace\test\src\test\core\middleware.py", line 193, in __call__
    response = self.get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\simple_history\middleware.py", line 41, in middleware
    return get_response(request)
           ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\allauth\account\middleware.py", line 36, in middleware
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\deprecation.py", line 129, in __call__
    response = response or self.get_response(request)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\decorators.py", line 188, in _view_wrapper
    result = _process_exception(request, e)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\utils\decorators.py", line 186, in _view_wrapper
    response = view_func(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\views\decorators\cache.py", line 80, in _view_wrapper
    response = view_func(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\django\contrib\admin\sites.py", line 241, in inner
    return view(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\import_export\admin.py", line 773, in export_action
    return self._do_file_export(
           ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\import_export\admin.py", line 837, in _do_file_export
    export_data = self.get_export_data(
                  ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\import_export\admin.py", line 718, in get_export_data
    export_data = file_format.export_data(data)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\import_export\formats\base_formats.py", line 213, in export_data
    return super().export_data(dataset, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\import_export\formats\base_formats.py", line 91, in export_data
    return dataset.export(self.get_title(), **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\tablib\core.py", line 434, in export
    return fmt.export_set(self, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\tablib\formats\_xlsx.py", line 63, in export_set
    wb.save(stream)
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\workbook\workbook.py", line 386, in save
    save_workbook(self, filename)
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\writer\excel.py", line 294, in save_workbook
    writer.save()
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\writer\excel.py", line 275, in save
    self.write_data()
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\writer\excel.py", line 77, in write_data
    self._write_worksheets()
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\writer\excel.py", line 215, in _write_worksheets
    self.write_worksheet(ws)
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\writer\excel.py", line 200, in write_worksheet
    writer.write()
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\worksheet\_writer.py", line 359, in write
    self.write_rows()
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\worksheet\_writer.py", line 125, in write_rows
    self.write_row(xf, row, row_idx)
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\worksheet\_writer.py", line 147, in write_row
    write_cell(xf, self.ws, cell, cell.has_style)
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\cell\_writer.py", line 90, in lxml_write_cell
    value, attributes = _set_attributes(cell, styled)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\Workspace\test\.venv\Lib\site-packages\openpyxl\cell\_writer.py", line 30, in _set_attributes
    raise TypeError("Excel does not support timezones in datetimes. "
TypeError: Excel does not support timezones in datetimes. The tzinfo in the datetime/time object must be set to None.
```

**Settings**
```
TIME_ZONE = "Europe/Berlin"
LANGUAGE_CODE = "en"
USE_I18N = False
USE_TZ = True
DATETIME_FORMAT = "D, j M Y H:i e"
SHORT_DATETIME_FORMAT = "j F Y H:i"
DATE_FORMAT = "j F Y"
SHORT_DATE_FORMAT = "j F"
TIME_FORMAT = "H:i:s"
FIRST_DAY_OF_WEEK = 1
```

**Versions (please complete the following information):**
 - Django Import Export: 4.2
 - Python 3.11.7
 - Django 5.1.3
 - tablib 3.7.0

**Expected behavior**
Working export without errors as in version 4.1.1




Discussion / hints:
Thanks for raising.  I am able to reproduce this and am working on a fix.

Fix patch:
diff --git a/import_export/widgets.py b/import_export/widgets.py
index 4fa8d9969..5e0c0469f 100644
--- a/import_export/widgets.py
+++ b/import_export/widgets.py
@@ -307,13 +307,16 @@ def clean(self, value, row=None, **kwargs):
 
     def render(self, value, obj=None, **kwargs):
         self._obj_deprecation_warning(obj)
-        force_native_type = kwargs.get("force_native_type")
         if not value or not isinstance(value, datetime):
             return ""
-        if self.coerce_to_string is False or force_native_type:
-            return value.replace(tzinfo=None) if force_native_type else value
         if settings.USE_TZ:
             value = timezone.localtime(value)
+
+        force_native_type = kwargs.get("force_native_type")
+        if self.coerce_to_string is False or force_native_type:
+            # binary formats such as xlsx must not have tz set
+            return value.replace(tzinfo=None) if force_native_type else value
+
         return format_datetime(value, self.formats[0])
 
 


Test patch:
diff --git a/tests/core/tests/admin_integration/test_export.py b/tests/core/tests/admin_integration/test_export.py
index bc1a7a447..d0dc34417 100644
--- a/tests/core/tests/admin_integration/test_export.py
+++ b/tests/core/tests/admin_integration/test_export.py
@@ -822,7 +822,7 @@ def test_dynamic_export_with_custom_resource(
         self.assertEqual(datetime(2000, 8, 2), wb.active["C2"].value)
 
 
-@override_settings(USE_TZ=True)
+@override_settings(USE_TZ=True, TIME_ZONE="UTC")
 class ExportTzAwareDateTest(AdminTestMixin, TestCase):
     # issue 1995
     # test that tz aware dates do not crash on export
@@ -850,6 +850,27 @@ def test_datetime_export_xlsx(self, mock_choose_export_resource_class):
         wb = load_workbook(filename=BytesIO(content))
         self.assertEqual(date_added.replace(tzinfo=None), wb.active["B2"].value)
 
+    @override_settings(TIME_ZONE="Asia/Hong_Kong")
+    @patch("import_export.mixins.BaseExportMixin.choose_export_resource_class")
+    def test_datetime_export_xlsx_with_timezone(
+        self, mock_choose_export_resource_class
+    ):
+        mock_choose_export_resource_class.return_value = self.BookResource_
+        date_added = datetime(2024, 11, 8, 14, 40, tzinfo=ZoneInfo("Asia/Hong_Kong"))
+        Book.objects.create(id=101, name="Moonraker", added=date_added)
+
+        data = {
+            "format": "2",
+            "bookresource_id": True,
+            "bookresource_title": True,
+            "bookresource_added": True,
+        }
+        response = self.client.post(self.book_export_url, data)
+        self.assertEqual(response.status_code, 200)
+        content = response.content
+        wb = load_workbook(filename=BytesIO(content))
+        self.assertEqual(date_added.replace(tzinfo=None), wb.active["B2"].value)
+
     @patch("import_export.mixins.BaseExportMixin.choose_export_resource_class")
     def test_datetime_export_xls(self, mock_choose_export_resource_class):
         mock_choose_export_resource_class.return_value = self.BookResource_