I'm kinda new to GWT.
I have been trying to parse a date in the format "dd-MMM-yyyy HH:mm z
" but I get an exception when the timezone is EDT or BST.
Doesn't GWT support these timezones while parsing? If so, is there any alternative way which I can use to parse the date using EDT?
Please help.
Code snippet:
DateTimeFormat dateParser = DateTimeFormat.getFormat("dd-MMM-yyyy HH:mm z");
String fomattedDate = dateParser.format(date,Timezone.createTimeZone(TimeZoneConstants.americaNewYork));
Date newDate = dateTimeParser.parse(formattedDate);
This line gives me exception.
After reading the docs for DateTimeFormat
it said that it supports a lower number of timezones while parsing.