Ich möchte nicht Standard-JSON-Format von Active Support. Also habe ich Code in app.rb meines Projekts eingefügt. ActiveSupport::JSON::Encoding.use_standard_json_time_format = false
Wie kann ich das Standard-JSON-Zeitformat von Active Support ändern?
es Zeitformat von iso8601
zu strftime('%Y/%m/%d %H:%M:%S %z')
geändert. Aber ich möchte Zeitformat strftime('%Y-%m-%d %H:%M:%S %z')
ändern.
Time.now.to_json => output "2016/06/20 10:57:43 +0300" but i want to format "2016-06-20 10:57:43 +0300"
Mein Projekt ist ein Ruby on Sinatra.
Ich habe es in app.rb Datei von meinem Projekt. – sozgur