aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLOfflineIMData.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
index 252f358..bafd204 100644
--- a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
+++ b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
@@ -47,13 +47,10 @@ namespace OpenSim.Data.MySQL
47 47
48 public void DeleteOld() 48 public void DeleteOld()
49 { 49 {
50 uint now = (uint)Util.UnixTimeSinceEpoch();
51
52 using (MySqlCommand cmd = new MySqlCommand()) 50 using (MySqlCommand cmd = new MySqlCommand())
53 { 51 {
54 cmd.CommandText = String.Format("delete from {0} where TMStamp < ?tstamp", m_Realm); 52 cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 WEEK", m_Realm);
55 cmd.Parameters.AddWithValue("?tstamp", now - 14 * 24 * 60 * 60); // > 2 weeks old 53
56
57 ExecuteNonQuery(cmd); 54 ExecuteNonQuery(cmd);
58 } 55 }
59 56