Update to DateTime.UtcNow
This commit is contained in:
parent
5b246ce641
commit
e6d07f2e83
2 changed files with 5 additions and 5 deletions
|
|
@ -248,7 +248,7 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
_database.Query("INSERT INTO Logs (TimeStamp, Caller, LogLevel, Message) VALUES (@0, @1, @2, @3)",
|
_database.Query("INSERT INTO Logs (TimeStamp, Caller, LogLevel, Message) VALUES (@0, @1, @2, @3)",
|
||||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture), caller, (int)level, message);
|
DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture), caller, (int)level, message);
|
||||||
|
|
||||||
var success = true;
|
var success = true;
|
||||||
while (_failures.Count > 0 && success)
|
while (_failures.Count > 0 && success)
|
||||||
|
|
@ -268,7 +268,7 @@ namespace TShockAPI
|
||||||
caller = "TShock",
|
caller = "TShock",
|
||||||
logLevel = TraceLevel.Error,
|
logLevel = TraceLevel.Error,
|
||||||
message = string.Format("SQL Log insert query failed: {0}", ex),
|
message = string.Format("SQL Log insert query failed: {0}", ex),
|
||||||
timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture)
|
timestamp = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -285,7 +285,7 @@ namespace TShockAPI
|
||||||
logLevel = level,
|
logLevel = level,
|
||||||
message = message,
|
message = message,
|
||||||
caller = caller,
|
caller = caller,
|
||||||
timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture)
|
timestamp = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
var logEntry = string.Format("{0} - {1}: {2}: {3}",
|
var logEntry = string.Format("{0} - {1}: {2}: {3}",
|
||||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),
|
DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),
|
||||||
caller, level.ToString().ToUpper(), message);
|
caller, level.ToString().ToUpper(), message);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -224,7 +224,7 @@ namespace TShockAPI
|
||||||
ServerApi.LogWriter.PluginWriteLine(TShock.instance, logEntry, TraceLevel.Error);
|
ServerApi.LogWriter.PluginWriteLine(TShock.instance, logEntry, TraceLevel.Error);
|
||||||
Console.WriteLine("Unable to write to log as log has been disposed.");
|
Console.WriteLine("Unable to write to log as log has been disposed.");
|
||||||
Console.WriteLine("{0} - {1}: {2}: {3}",
|
Console.WriteLine("{0} - {1}: {2}: {3}",
|
||||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),
|
DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),
|
||||||
caller, level.ToString().ToUpper(), message);
|
caller, level.ToString().ToUpper(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue