removed code that mysteriously caused player count to be inaccurate.

fixed unrepresentable datetime when minute rounded to 60 (forgot to copy changes to release code)

fixed the player graph render time (apparently canvasjs doesn't like big numbers

hopefully fixed duplicate 'stats' pages from appearing.
This commit is contained in:
RaidMax
2017-10-15 20:40:27 -05:00
parent 0bdec1147b
commit 4c813b18d6
7 changed files with 41 additions and 21 deletions

View File

@ -7,7 +7,7 @@ namespace SharedLibrary.Helpers
public PlayerHistory(int cNum)
{
DateTime t = DateTime.UtcNow;
When = new DateTime(t.Year, t.Month, t.Day, t.Hour, 5 * (int)Math.Round(t.Minute / 5.0), 0);
When = new DateTime(t.Year, t.Month, t.Day, t.Hour, Math.Min(59, 15 * (int)Math.Round(t.Minute / 15.0)), 0);
PlayerCount = cNum;
}
@ -25,11 +25,11 @@ namespace SharedLibrary.Helpers
/// <summary>
/// Used by CanvasJS as a point on the x axis
/// </summary>
public double x
public string x
{
get
{
return (When - DateTime.MinValue).TotalSeconds;
return When.ToString("yyyy-MM-ddTHH:mm:ssZ");
}
}