I have a junit test as stated below:
Calendar cal = somecode.getDate();
assertEquals("1941-02-31-05:00", cal.toString);
This passes in my local machine but in the sandbox due to timezone standard differences, the value of cal.toString() comes up as "1941-02-31Z". So, the assertion keeps failing. Does anyone know how I can make this pass in both the places without changing timezone standards or formats in either machines. May be just by setting a default time zone standard inside the code?
I cannot upgrade from Java 6. So, I need to find a solution inside the code.