I have a C# application that serializes its DTOs to JSON and sends them accros the wire to be processed by Ruby. Now the format of the serialized date is like so:
/Date(1250170550493+0100)/
When this hits the Ruby app I need to cast this string representation back to a date/datetime/time (whatever it is in Ruby). Any ideas how I would go about this?
Cheers, Chris.
You could parse out the milliseconds since the epoch, something like:
You’d still need to handle the timezone info (the
+0100part), so this is a starting point.