Add 'sdk/java-v2/' from commit '55f103e336ca9fb8bf1720d2ef4ee8dd4e221118'
[arvados.git] / services / api / config / initializers / time_format.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 ActiveSupport::JSON::Encoding.time_precision = 9
6
7 class ActiveSupport::TimeWithZone
8   remove_method :as_json
9   def as_json *args
10     strftime "%Y-%m-%dT%H:%M:%S.%NZ"
11   end
12 end
13
14 class Time
15   remove_method :as_json
16   def as_json *args
17     strftime "%Y-%m-%dT%H:%M:%S.%NZ"
18   end
19 end