This Picture shows all necessary data to understand the Problem:
I have copy a File to another Client, using a networkdrive.
Than i have set the LastWriteTimeUtc to a defined value.
When i read the LastWriteTimeUtc of the written File (i used Refrech) there is always a glitch betwenn 1-2 Sek.
First i thought its connected with the local Time of each Client.
I tried to sync the local Time or set the local Time to a gread difference without any effect.
I also tried to find a cut in the binary precision but the digit which does not change lead to a precision of 40Sek. and not 1-2Sek. what says me its not connected to a precision.
I checked also the private Data of the FileInfo, and it is really not equal:
ftLastWriteTimeLow = 0xabdf4f00
ftLastWriteTimeLow = 0xaaf64ea1
I am at my wit's end.
Just if someone want to code a little bit (Traget&Source are getter which call .Refresh() on every Access):
Source.LastWriteTimeUtc = DateTime.UtcNow;
Target.LastWriteTimeUtc = Source.LastWriteTimeUtc;
Target.CreationTimeUtc = Source.CreationTimeUtc;
var lLastWriteTimeUtc = ToBinary(Target.LastWriteTimeUtc.Ticks & 0xFFFFFFFF3000000);
var lLastWriteTimeUtc2 = ToBinary(Source.LastWriteTimeUtc.Ticks & 0xFFFFFFFF3000000);
var lLastWriteTimeUtc31 = ToBinary(Target.LastWriteTimeUtc.Ticks & 0xFFFFFFFF0000000);
var lLastWriteTimeUtc32 = ToBinary(Source.LastWriteTimeUtc.Ticks & 0xFFFFFFFF0000000);
var x = new DateTime(Source.LastWriteTimeUtc.Ticks & 0xFFFFFFFF0000000);
var y = new DateTime(Target.LastWriteTimeUtc.Ticks & 0xFFFFFFFF0000000);
public static string ToBinary(Int64 Decimal)
string BinaryResult = "";
while (Decimal > 0)
BinaryHolder = Decimal % 2;
BinaryResult += BinaryHolder;
Decimal = Decimal / 2;
BinaryArray = BinaryResult.ToCharArray();
BinaryResult = new string(BinaryArray);