-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Date test in another Locale #327
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sakebook. Just one change needed, and then we can merge.
new SimpleDateFormat(PATTERN_RFC1123), | ||
new SimpleDateFormat(PATTERN_RFC1036), | ||
new SimpleDateFormat(PATTERN_ASCTIME) | ||
new SimpleDateFormat(PATTERN_RFC1123, Locale.UK), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's follow what http://svn.apache.org/repos/asf/httpcomponents/httpclient/tags/4.3/httpclient/src/main/java/org/apache/http/client/utils/DateUtils.java does and set to Locale.US
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it. 3e8ec14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Discussion
No issue.
Current Date test is depend on Locale(GMT).
I ran the test on my local machine and it was not successful.
This is because the Japanese locale (JMT) is used.
I defined use Locale.US.
Testing
Fixed test
API Changes
None
RELEASE NOTE: Fixed a bug in date string parsing during error handling.