[Mono-bugs] [Bug 45066][Nor] New - FileSystemInfo.CreationTime does not stick (MonoIO.SetFileTime())

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 18 Jun 2003 10:50:33 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by ndrochak@gol.com.

http://bugzilla.ximian.com/show_bug.cgi?id=45066

--- shadow/45066	Wed Jun 18 10:50:33 2003
+++ shadow/45066.tmp.29133	Wed Jun 18 10:50:33 2003
@@ -0,0 +1,40 @@
+Bug#: 45066
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 8.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ndrochak@gol.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: FileSystemInfo.CreationTime does not stick (MonoIO.SetFileTime())
+
+The following test shows one symptom, but I think the real problem is in
+MonoIO.SetFileTime() for creation_time.
+-----------------------------------------------------
+using System;
+using System.IO;
+
+class C {
+	public static void Main () {
+		string path = "somedirectoryname";
+		try {
+			FileSystemInfo info = Directory.CreateDirectory (path);
+			info.CreationTime = new DateTime (1999, 12, 31, 11, 59, 59);
+			DateTime time = info.CreationTime;	
+			if (1999 != time.Year)
+				Console.WriteLine ("Failed: {0}", time.Year);
+			else
+				Console.WriteLine ("Passed");
+		} finally {
+			Directory.Delete (path, true);
+		}
+	}
+}