Hi all,
Vaadin 8:
DateTimeField df = new DateTimeField();
df.setDateFormat(“dd MMM yyyy - hh:mm:ss a z”);
Vaadin 7:
PopupDateField df = new PopupDateField();
df.setDateFormat(“dd MMM yyyy - hh:mm:ss a z”);
Then select any date and time.
Expected output:
The value shown to the user ends with ‘CET’ (in my case)
Actual output:
The value shown to the user ends with ‘UTC+1’ (in my case)
Explanation:
The javadoc says: See SimpleDateFormat, and the below Java code prints something which ends with “CET” (in my case).
SimpleDateFormat format = new SimpleDateFormat(“dd MMM yyyy - hh:mm:ss a z”);
System.out.println(format.format(new Date()));
Appreciate your feedback.