Make Date.parse() a tad more lenient.

Support zone strings of the form GMT+04:30 in addition to
GMT+0430 and GMT+5. This fixes a couple of our URLConnectionTests
in cases where server was sending back dates in this format.

As a follow-up okhttp change, we should consider overriding
URLConnection#getHeaderFieldDate so that we can avoid using Date.parse
altogether.

bug: 26326992
Change-Id: Ia1198afb18f84874a9726e46c26d575ea9ff3f45
2 files changed