SimpleDateFormat is buggy.... Change to using DateTimeFormatter See https://stackoverflow.com/questions/45189859/java-simpledateformat-formatter-to-return-epoch-time-with-milliseconds