title: Datetimes and .NET with SQLite
body: <p>I have a table:</p>
  
  <pre><code>CREATE TABLE [Lines] (
  [Value] TEXT  NOT NULL,
  [AddedOn] TIMESTAMP DEFAULT CURRENT_TIMESTAMP NULL
  )
  </code></pre>
  
  <p>As you can see, the AddedOn column is a timestamp and is set to record the current datetime if one is not provided at insert time.</p>
  
  <p>Please consider the following c# code:</p>
  
  <pre><code>using (var cmd = conn.CreateCommand())    
  {
      cmd.CommandText = "INSERT INTO Lines(Value) VALUES (@Value)";
      cmd.Parameters.AddWithValue("@Value", objectValue);
      cmd.ExecuteNonQuery();
  }    
  </code></pre>
  
  <p>Note that above I am letting SQLite assign the date.  Now, the same code, except I am passing the AddedOn value (e.g. DateTime.Now - right now)  </p>
  
  <pre><code>using (var cmd = conn.CreateCommand())    
  {
      cmd.CommandText = "INSERT INTO Lines(Value, AddedOn) VALUES (@Value, @AddedOn)";
      cmd.Parameters.AddWithValue("@Value", objectValue);
      cmd.Parameters.AddWithValue("@AddedOn", DateTime.Now);
  
      cmd.ExecuteNonQuery();
  }
  </code></pre>
  
  <p>If I then compare the results of these 2 inserts, I find that when I let the AddedOn default kick in (first example), it saved the current datetime at the GMT.  When I passed the date explicitly (2nd example), it saved the actual current datetime in my timezone.</p>
  
  <p>Is this by design?  Is it a bug?  It seems like the behavior should be consistent and the datetime I pass in should be converted to GMT.</p>