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:
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user