When running some tests I came across the following issue. When using:

private String printStandardDate(Date date) {
    return DateFormat.getDateTimeInstance(
        DateFormat.SHORT, DateFormat.SHORT).format(date);
}

I found this produced different formats of Date depending on the location the tests where run from. So locally in windows / eclipse I got a result: 04/02/12 18:18 but on the Linux box in America I get 2/4/12 6:18 PM

This causes my Tests/Build to fail:

expected:<[04/02/12 18:18]> but was:<[2/4/12 6:18 PM]>

Could anyone explain this behavior?

Edit
Report