Its not that complicated. Like the Star Trek series, there are two timelines.
Timeline A
-X-Men: First Class (2011)
-X-Men Origins (2009)
-X-Men (2000)
-X2: X-Men United (2003)
-X-Men: The Last Stand (2006)
-The Wolverine (2013)
-The future sequences of Days of Future Past (2014)
Timeline B
-X-Men: First Class (2011)
-The events of X-Men Origins (2009) up until 1973
-Days of Future Past (2014) sans the initial future sequences
-X-Men: Apocalypse (2016)
-Deadpool (2016)
-Legion (2017)
It makes sense for LOGAN to take place in Timeline B, given that Timeline A is done. Days of Future Past ends with Wolverine back at the mansion in 2016. If LOGAN indeed takes place in 2024, a lot has happened in the last eight years.