From aa6b3f70ed16687811b623b37728a2dd2f7ea304 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 17 Oct 2014 07:07:21 -0700 Subject: [PATCH] Fixed: log to the database using UTC not local time --- src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs index 4c9ed9eda..daf308f96 100644 --- a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs +++ b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs @@ -89,7 +89,7 @@ namespace NzbDrone.Core.Instrumentation var sqlCommand = new SQLiteCommand(INSERT_COMMAND, _connection); sqlCommand.Parameters.Add(new SQLiteParameter("Message", DbType.String) { Value = log.Message }); - sqlCommand.Parameters.Add(new SQLiteParameter("Time", DbType.DateTime) { Value = log.Time }); + sqlCommand.Parameters.Add(new SQLiteParameter("Time", DbType.DateTime) { Value = log.Time.ToUniversalTime() }); sqlCommand.Parameters.Add(new SQLiteParameter("Logger", DbType.String) { Value = log.Logger }); sqlCommand.Parameters.Add(new SQLiteParameter("Exception", DbType.String) { Value = log.Exception }); sqlCommand.Parameters.Add(new SQLiteParameter("ExceptionType", DbType.String) { Value = log.ExceptionType });