DeVaNsHk72 opened a new pull request, #44391: URL: https://github.com/apache/superset/pull/44391
### SUMMARY Exported ZIP bundles gave every extracted file a modification date of 30.12.1899 in Windows Explorer, and an empty last-modified field in 7-Zip. Cause: `ZipFile.open(name, "w")` builds a `ZipInfo` whose `date_time` defaults to the 1980-01-01 DOS epoch — unlike `writestr`, which stamps the current time. Every Superset export bundle used the `open()` form, so no entry ever carried a real timestamp. Single-file downloads were unaffected, which matches the report. This adds `write_zip_entry()` in `superset/utils/core.py`, which passes an explicit `ZipInfo` stamped with the current local time while keeping the bundle's compression setting and the `0o600` permissions `ZipFile.open` used to apply. The multi-query CSV/XLSX bundle (`create_zip`) and the chart, dashboard, database, dataset, saved query, theme and asset export endpoints all route through it. ### TESTING INSTRUCTIONS 1. Run a chart query that returns multiple queries and export it as CSV or XLSX, so the result is bundled as a ZIP. 2. Extract the archive and check the file dates — they now show the time the export was generated instead of 30.12.1899 / blank. 3. The same holds for the asset export endpoints (`/api/v1/chart/export/`, `/api/v1/dashboard/export/`, etc.). Unit tests: `pytest tests/unit_tests/utils/create_zip_tests.py` ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #44388 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
