Zip*_*ius 5 c# windows explorer datetime file
我在尝试在文件上设置 CreationTime 和 LastWriteTime 时遇到了一些奇怪的事情。
DateTime nDT = new DateTime(1974, 12, 23,10,31,34);
string path = @"C:\Users\matte\Desktop\Desktop_Test.zip";
File.SetCreationTime(path, nDT);
File.SetLastWriteTime(path, nDT);
Run Code Online (Sandbox Code Playgroud)
我在控制台应用程序中使用此代码,当它运行时,它会更新这些属性,但相关值从 Windows 资源管理器中消失。
我做错了什么吗?
小智 1
我想如果日期在 1980, 1, 1 之前你就不会看到它。文章太多了,但对我来说有意义的是https://superuser.com/questions/796762/what-is-the-range- of-dates-that-windows-explorer-can-display。