Improve regular expressions and restore strptime-strftime roundtrip
Fix for Ruby 2.0