Moved a bunch of time functions into UTC. Fixes bugs which we only see for 4 hours...
[rails.git] / app / models / way.rb
index 94a6fa7548faf23299219d5e7f9d5aed72e82847..6e4f30d81751ef6ea01bec7de6370cd7ce95664a 100644 (file)
@@ -51,7 +51,7 @@ class Way < ActiveRecord::Base
 
     # This next section isn't required for the create, update, or delete of ways
     if create
-      way.timestamp = Time.now
+      way.timestamp = Time.now.getutc
       way.visible = true
     else
       if pt['timestamp']
@@ -296,7 +296,7 @@ class Way < ActiveRecord::Base
   private
   
   def save_with_history!
-    t = Time.now
+    t = Time.now.getutc
 
     # update the bounding box, note that this has to be done both before 
     # and after the save, so that nodes from both versions are included in the