in my case I have: "Sun, 11 Apr 21 09:09:13 +0000"
my code is:
Long result = null;
try {
DateTimeFormatter dateFormatterRssPubDate = DateTimeFormat.forPattern("EEE, dd MMM yyyy HH:mm:ss Z");
result = dateFormatterRssPubDate.parseMillis(givenStringDate);
if(result!=null && result>=0)
return result;
} catch (Exception e) {
// logging
}
but it returns a negative number, such as: -61495771847000
Am I doing something wrong? if so, what is the best approach to convert a string date to millis with Joda in java?