Catch AssertionError when connecting to sockets.

Annoyingly this is thrown on Android when libcore.io.Posix.getsockname() throws libcore.io.ErrnoException, rather than just an IOException.
When manually constructing SimpleDateFormat, specify Locale.US or otherwise we may end up on non-latin scripts.

See SimpleDateFormat javadoc for a discussion.