You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would need to be able to change the default output format for this timestamp. I have a fork of version 3.1 where I added a setting for this. I have not converted it to version 4 yet as I am not sure Phoenix supports it.
Is it possible to change the following line to something more like below?
case Application.get_env(:poison, :datetime_formatter) do
nil ->
Poison.Encoder.BitString.encode(@for.to_iso8601(value), options)
formatter ->
Poison.Encoder.BitString.encode(formatter.format(value), options)
end
This would allow the consumer to override the datetime output format while still defaulting to the previous behaviour.
I have not found any other system-wide solution for making sure that all the datetimes we output have the same format. If you'd to make an exception, I guess you just have to format it to a string before you encode it, but this is for all timestamps present when encoding.
The text was updated successfully, but these errors were encountered:
We would need to be able to change the default output format for this timestamp. I have a fork of version 3.1 where I added a setting for this. I have not converted it to version 4 yet as I am not sure Phoenix supports it.
Is it possible to change the following line to something more like below?
poison/lib/poison/encoder.ex
Line 368 in f5de8e1
This would allow the consumer to override the datetime output format while still defaulting to the previous behaviour.
I have not found any other system-wide solution for making sure that all the datetimes we output have the same format. If you'd to make an exception, I guess you just have to format it to a string before you encode it, but this is for all timestamps present when encoding.
The text was updated successfully, but these errors were encountered: