0

I'm not sure how\where to deal with this to be honest...

So when I debug my service the value set to return in VS is 11/25/2015 11:59:59

The JSON returned on the client however shows it at http://dojo.telerik.com/@steve@sitefinitysteve.com/oZaPe (or Tue Jan 26 2016 04:59:59 GMT-0500 (Eastern Standard Time))

Is there a way to tell servicestack to always return -5 instead of needing to hunt down every date object in the entire system to convert or something?

Steve McNiven-Scott
  • 1,770
  • 2
  • 15
  • 29
  • Possible duplicate of [ServiceStack - Is there a way to force all serialized Dates to use a specific DateTimeKind?](http://stackoverflow.com/questions/19694475/servicestack-is-there-a-way-to-force-all-serialized-dates-to-use-a-specific-da) – Scott Feb 04 '16 at 23:23

1 Answers1

2

You can override how DateTime's are serialized by assinging: JsConfig<DateTime>.SerializeFn - see this previous answer or these Custom DateTime tests for examples.

Community
  • 1
  • 1
mythz
  • 141,670
  • 29
  • 246
  • 390