[jcifs] more timestamp weirdness

Julian Reschke julian.reschke at gmx.de
Tue Feb 24 14:09:37 GMT 2004


Hi,

I'm using 0.8.0; and it seems as if the behaviour regarding creation 
timestamps is erratic...

	private static void testCreationTimestamp() throws IOException {
		
		SmbFile smb = new SmbFile("smb://" + creds + host + "/" + share + 
"/newfile3");
		System.out.println(smb.getCanonicalPath());
	
		SmbFileOutputStream so = new SmbFileOutputStream(smb);
		so.close();
		
		System.out.println("creation date before setLastMod: " + 
smb.createTime());
		
		smb.setLastModified(12345678L);
		
		System.out.println("creation date after setLastMod: " + smb.createTime());
	}

With the sample code above, I get "0" as value for the creation date, 
both before and after setting the lastmodified date. However, at some 
point of time the creation date *seemed* to work, but was reset to 0 
after setting the last modification date.

In both cases, Windows Explorer displays the same creation date (January 
1st 1970).

Regards, Julian

-- 
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760


More information about the jcifs mailing list