I have this input:
Thu May 31 01:43:45 GMT-8 2018
These are the most recent patterns I have tried:
"EEE MMM dd HH:mm:ss zX yyyy"
"EEE MMM dd HH:mm:ss 'GMT'X yyyy"
"EEE MMM dd HH:mm:ss zX yyyy"
I get an unparseable date exception thrown when I try parsing the input using the patterns. I have tried several patterns but can't figure out how to match the GMT offset portion of the input. I can do this with regular expressions - I don't really need the offset but would rather figure out what pattern to use. Of course the offset could also be a 2-digit offset if it's more than 9 hours from GMT.
I've looked at the SimpleDateformat documentation and several examples here and other places but can't figure out the correct pattern I need.
OmatchGMT-8