refactor(RSSHandlerRoutine): switch to Instant by christolis · Pull Request #1365 · Together-Java/TJ-Bot
Handle rewriting timestamps from the specific RSS feed's format to a more unified Instant string format. If a DateTimeParseException is thrown while attempting to work with the date format, use that opportunity to attempt to parse that original date with the given date format pattern, then convert it into a string using 'Instant#toString'. If the conversion fails, simply return an empty Optional and let the rest of the code handle it from there since the new value will be overwritten in any case. Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters