-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Conversation
Haha! You really should've kept the whitespace changes for a separate commit 😉 |
@khellang done 👅 |
Much better! 😄 Isn't the ISO 8601 format |
not according to this - http://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Sortable |
Looks fine to me, need to document this as a breaking change though. Suspect anyone requiring the old shitty date formatting is going to have a cry if/when this is released. |
You should be able to opt-out if your app breaks because of this... |
I'm with Phillip. That's what release notes are for |
Will this break all of us that rely on the WCF date format? If so, please do make this an optional thing. Or I will indeed cry loudly ;-) If your app has a REST api based on Nancy -- that used to send out the WCF date format, all consumers will simply rely on this. You can't just go breaking this as all client apps will break horribly and will need to be rewritten... |
Guess we could make it a setting in JsonSettings. Let's see what |
A JSON setting does sound like the right approach, yes 👍 |
The cost of adding an if-else statement to provide users with an opt-out solution is not really high. It's bad PR to tell the user that "we broke it and didn't provide a way to fix it again" in the release notes 😛 |
@jchannon any reason why iso8601 isn't turned on by default? |
Just to prevent people's stuff breaking when they upgrade |
@jchannon - we should push the new standard, but allow the user to revert back. |
Exactly, opt-out, not in 😉 |
yes! |
Basically @jchannon... You fucked up. Fix it. We still love you tho. |
Yeah, make the new behaviour default, mark it as a breaking change and put info in the issue text about how to change it back. |
Has anyone actually verified that this is the format that #1346 needs? :) |
|
@grumpydev you will have to label it as a breaking change as only you and Andreas can do that I believe |
+1 for default. better to break earlier than later. |
Changed date serialization
🤘 This is the 💣 i've wanted this for a while. Thanks for doing this 😃 |
@jugglingnutcase no worries, thanks for the thanks 😄 |
A question about this change, regarding this line in Nancy.Json.JsonDeserializer:
Wouldn't it be better to change this to "o" (round-trip) format rather than "s"? You get more accuracy and also timezone information then. That way it's possible to differentiate between UTC and Local date-times. Look at these examples in "o" format:
In "s" format they are a bit too basic and cannot be told apart anymore:
Any thoughts? |
I actually went ahead and did the work to improve this (incl unit tests) and submitted this pull request: #1485 :-) |
Fixes #1346
To revert to previous behaviour use the below code in the Bootstrapper:
JsonSettings.ISO8601DateFormat = false