Home > Net >  Byte [] time conversion
Byte [] time conversion

Time:11-23

The server receives the data as follows: 86 DE CE BE 56 0 b E5 40


Time is: 2017/12/29 05:03

Another set of data 00 00 00 00 00 00 F0 3 f

Time is 1 day is 24 hours. The client has a countdown,

Time transformation algorithm can anyone know? Consult, stuck in here, the old server written D7, old end without the source code. To change a c # write now.

CodePudding user response:

Delphi dede can be used to compile the see

Eight bytes, originally forecast for long, may be a Unix timestamp, using a tool, it may not seem like Unix time

So suggest dede decompiling

CodePudding user response:

You'd better give three time
If time no encryption, so two time can determine your scale and the start point, the third can validate the algorithm is correct,

CodePudding user response:

 
Byte [] b=new byte [] {xce x86 0, 0 xde, 0, 0 xbe, 0 x56, 0 x0b, 0 xe5, 0 x40};
Var d=DateTime. FromOADate (BitConverter ToDouble (b, 0));
Console. WriteLine (d);

Take a look at this

CodePudding user response:

The
reference 3 floor MQMMX response:
 
Byte [] b=new byte [] {xce x86 0, 0 xde, 0, 0 xbe, 0 x56, 0 x0b, 0 xe5, 0 x40};
Var d=DateTime. FromOADate (BitConverter ToDouble (b, 0));
Console. WriteLine (d);

Look at the


I went to do some test
  •  Tags:  
  • C#
  • Related