Does re-importing exported LeetCode submission timestamps preserve original dates or are they treated as new submissions?
0 reputation · 30 Apr 2022, 18:50 UTC
0 reputation · 30 Apr 2022, 18:50 UTC
LeetCode’s Account Settings include an "Export Data" feature that produces a JSON file containing a user’s submission history, including timestamps, language, code snippets, and verdicts. The platform does not provide an official import or restore function, so users who wish to recover their data must manually re‑submit the saved code via the web interface or API. When doing so, it is unclear whether the platform retains the original submission timestamps from the exported JSON or assigns the current time, which directly influences streak counters, duplicate‑submission checks, and contest rating adjustments.
The uncertainty stems from the lack of documented behavior for manually re‑imported submissions and the potential side‑effects on longitudinal metrics.
Re‑importing a LeetCode submission from exported JSON does not preserve the original timestamp. The platform treats the re‑submitted code as a brand‑new entry, stamping it with the current server time.
Because the export is an archival snapshot and the platform’s submission pipeline timestamps events server‑side, any re‑uploaded code inherits the current time. The original timestamp fields in the JSON remain useful as personal records or for third‑party analytics that read the file directly, but they have no effect on platform‑side metrics.
Note: LeetCode's export format and streak logic are undocumented and may change across platform updates; the behavior described reflects generally observed patterns as of 2026.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.