Java UTC Date formatting

I was trying to fix a test that is expecting a date to come back in UTC format.

It was using the XStream ISO8601DateConverter.

It worked fine if you were in the UK timezone, but not in a different timezone.

It hurt my head, so I wrote a test to demonstrate how to make it work.

Which is DateFormattingTest.java here.

Share