fix(python): remove datetime.UTC usage for Python 3.10 compatibility

Replace datetime.datetime.now(datetime.UTC) with datetime.datetime.now()
to fix compatibility issues with Python 3.10 and earlier versions.

datetime.UTC is only available in Python 3.11+, causing 500 errors
in production environment.

Files fixed:
- app/module/dataset/service/pdf_extract.py
- app/module/generation/service/export_service.py
This commit is contained in:
2026-02-06 13:34:27 +08:00
parent fbc83b5610
commit c6dccf5e29
2 changed files with 2 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ class SynthesisDatasetExporter:
file_path=file_path,
file_type="jsonl",
file_size=file_size,
last_access_time=datetime.datetime.now(datetime.UTC),
last_access_time=datetime.datetime.now(),
)
self._db.add(df)
created_files.append(df)