--- /dev/null
+Ensure ``DirEntry.stat().st_ctime`` behaves consistently with
+:func:`os.stat` during the deprecation period of ``st_ctime`` by containing
+the same value as ``st_birthtime``. After the deprecation period,
+``st_ctime`` will be the metadata change time (or unavailable through
+``DirEntry``), and only ``st_birthtime`` will contain the creation time.
find_data_to_file_info(dataW, &file_info, &reparse_tag);
_Py_attribute_data_to_stat(&file_info, reparse_tag, NULL, NULL, &entry->win32_lstat);
+ /* ctime is only deprecated from 3.12, so we copy birthtime across */
+ entry->win32_lstat.st_ctime = entry->win32_lstat.st_birthtime;
+ entry->win32_lstat.st_ctime_nsec = entry->win32_lstat.st_birthtime_nsec;
+
return (PyObject *)entry;
error: