Skip to content

Commit b0792fa

Browse files
committed
Use ticks to avoid double value.
1 parent a3a8b29 commit b0792fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BencodeNET.Net45/Objects/TorrentFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public DateTime CreationDate
4141
}
4242
set
4343
{
44-
var unixTime = value.Subtract(_epoch).TotalSeconds.ToString();
44+
var unixTime = (value.Subtract(_epoch).Ticks/TimeSpan.TicksPerSecond).ToString();
4545
Value[Fields.CreationDate] = new BString(unixTime);
4646
}
4747
}

0 commit comments

Comments
 (0)