19139: Fixes bug by always setting owner_uuid to the system root user's UUID.
[arvados.git] / services / api / config / initializers / time_format.rb
index d476781e55ca8638186d2cbe5ed2cc50e5fdd8cc..78cabc87ac7cd5f66a07becb1207be53ff6e2af3 100644 (file)
@@ -1,4 +1,18 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+ActiveSupport::JSON::Encoding.time_precision = 9
+
 class ActiveSupport::TimeWithZone
+  remove_method :as_json
+  def as_json *args
+    strftime "%Y-%m-%dT%H:%M:%S.%NZ"
+  end
+end
+
+class Time
+  remove_method :as_json
   def as_json *args
     strftime "%Y-%m-%dT%H:%M:%S.%NZ"
   end