Merge branch '8784-dir-listings'
[arvados.git] / services / api / config / initializers / time_format.rb
index ca67b19ce2519c14113437a3ddac67464033541e..3d690930ae18a1a4d1956f0872b37eec77d9d228 100644 (file)
@@ -1,5 +1,17 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class ActiveSupport::TimeWithZone
-  def as_json
+  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
 end