Half Life 2 is set in 2020, the 7 hour war occurring in 2010 and Half Life 1 happening in 2000. Portal 1 occurs some time between 1998~2020 (Glados mentions that the world has already ended as we know it) . Portal 2 (after the long sleep) is estimated to be around 2200~2300+ (depends on how many 9s the deep-sleep wake up computer actually says). Another theory is that it is 9999 days, but then it repeats, suggesting Portal 2 is not far outside of Half Life 2's time line, putting it more or less around 2027/2028. This would offer a direct tie in to Half Life 3/Episode 3.
Edit: Minor curiosity, a life ring from the infamous Borealis can be discovered in Portal 2 also.
Edit: Minor curiosity, a life ring from the infamous Borealis can be discovered in Portal 2 also.