X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4f8b2d755cb8249cd9118b7d3213a0021b83b0cb..784ef6318884a2e866390e1650185e4e43c875be:/services/api/config/initializers/time_format.rb diff --git a/services/api/config/initializers/time_format.rb b/services/api/config/initializers/time_format.rb index d476781e55..78cabc87ac 100644 --- a/services/api/config/initializers/time_format.rb +++ b/services/api/config/initializers/time_format.rb @@ -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