Display

Displaying dates in an application also depends to a great degree on context. Although you should always use DateFormat or its equivivalent to get locally formatted dates and times, the exact format you get can and should be tailored to the application's needs.

In particular, you may want to use a locale-neutral, unambiguous format for values such as timestamps.

Date and times also have an orthogonal component which can be quite irksome: timezones. The timezone of the server may not be the most approprite one for display of dates. GMT might not be a good choice either. In any case you need to ensure that display and parsing of dates and times is handled appropriately.

Information on timezones can be found in Timezones

Here are some of the formats: