Fix date tests

Fixes the test case to pass the tests in your own environment. Cause is
probably the difference of time zone, the tests should pass independently
of the environment.
Fix expected value
Update tests to avoid API testing with using API
Remove unuse variable
Improved tests to the detection of AM and PM that it does not depend on the API
Fix %Z format tests
Merge pull request #520 from okuryu/fix-date-tests

date: Fix unit tests