Release dates:

Original Timeline:

1962 X-Men: First Class
1979 X-Men Origins: Wolverine
2000 X-Men
2003 X2: X-Men United
2006 X-Men: The Last Stand
2013 The Wolverine
2026 X-Men: Days of Future Past - Present-day Scenes (Start - 0:17:00)

So when did everything change?  Well Days of Future Past completely changed the timeline in 1973 from the point where Professor Xavier, Logan and Magneto burst into the office where Mystique is about to shoot Dr. Trask.  From that point onward, anything that had previously transpired after 1973 was changed.  This means the events of the films X-Men, X2, The Last Stand, Origins: Wolverine  and The Wolverine never took place, though one can still watch the first sixteen minutes of X-Men Origins: Wolverine as they did happen pre Future Past.

Now while it is possible that the events of X-Men and X2 may have still taken place in a similar manner (Rogue has her mallen streak for example at the end of Days of Future Past), nothing from Last Stand onward could have possibly taken place, so for the purpose of simple continuity (or as much as can be, given the rather loose continuity at times within the X-Men universe) they have been completely retconned out of existence.

As for the events of Deadpool 2 and where this film fits into the timeline, the current young cast of the X-Men, him knowing the events of Logan...well, I think all we can say is that Deadpool himself is a little bit of an enigma.  The X-Men universe has never been exactly 'tight', even in the comics and a lot of continuity is lost, misplaced or simply forgotten.  Hey, it's Deadpool folks, just accept it.



New Timeline:

1962 X-Men: First Class
1973 X-Men: Days of Future Past (0:17:00 - 1:55:05)
1983 X-Men: Apocalypse
2016 Deadpool
2018 Deadpool 2
2023 X-Men: Days of Future Past - New Present-day Scene (1:55:05 - End)
2029 Logan