Skip to content

Commit

Permalink
Merge pull request #231 from craigp1231/master
Browse files Browse the repository at this point in the history
Use Unix Timestamp instead of Ticks
  • Loading branch information
sim0n00ps authored Dec 19, 2023
2 parents 5993e58 + 5185852 commit a8a455d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OF DL/Helpers/APIHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public async Task<Dictionary<string, string>> GetDynamicHeaders(string path, str
root = JsonConvert.DeserializeObject<DynamicRules>(body);
}

long timestamp = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
DateTimeOffset dto = (DateTimeOffset)DateTime.UtcNow;
long timestamp = dto.ToUnixTimeMilliseconds();

string input = $"{root.static_param}\n{timestamp}\n{path + queryParams}\n{auth.USER_ID}";
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
Expand Down

0 comments on commit a8a455d

Please sign in to comment.