I have a time picker in android. When the user chooses the time, it is returned two integers (hourOfDay and minute) through onTimeSet method. Its signature is shown bellow:
public void onTimeSet(TimePicker view, int hourOfDay, int minute);
What I want is to show to the user the chosen time in the local pattern. So, in Brazil or France, the time should be seen as 14:30, while in the US, 2:30 PM. At the moment I'm using joda-time library and not LocalTime, because android does not support the last one. If I can get the String pattern of time the problem is solved, because I can call the toString(String pattern) method.
LocalTime localTime = new LocalTime(hourOfDay, minute);
localTime.toString(pattern /* to be found */)
I have the same problem with another Picker. The user chooses the date and year, month and dayOfMonth are returned. In this case, in Brazil or France the date should be display as 12/01/2000 while in the US 1/12/2000.
How can I solve this? Any ideas?
Thanks in advance