Moved code from https://code.google.com/r/smeat32-nodatime-servicestack/