As far as DC is concerned, Batman Beyond appears to exist in a somewhat amorphous 40-50ish years ahead of whenever the current timeline is. Which good for them, I guess one has to become accustomed to things like that in comics, where characters have aged maybe 10 years or so in the past almost 80 years of publication, but that doesn't do me much good. Best policy for roleplaying someone seems to know when the stuff is supposed to be. Especially if that someone is from the future, as about 90% of the time the question you get first is "What year are you from?"
So I took the dates from the shows and stuff and came up with a few answers.
Now, Batman Beyond first aired in 1999, and afair (and from a few things I've seen around) it was designed to be set 40 years into the future. So the very first scene, with young!old!Bruce, would have been 2019, and the '20 years later' portion of the show proper would be set in 2039. Seems simple enough, right? And well it SHOULD be. Problem is that there's also a bunch that says that the show is supposed to be set about 50 years into the future, not 40, and there's more timelines than even the two. Which is right? All of them. Thanks for that, DC.
In DCAU there's only two shows that are actively set in the future: Batman Beyond and its spinoff, The Zeta Project. However, Justice League Unlimited and Static Shock both timeskip into Beyond!time for a little while. This provides a few different places where canon is presented to work with.
So let's start off with the shows that are actually set in the future, BB and ZP. To the best of my knowledge, specific dates are never mentioned in Batman Beyond, merely subjective dates -- '20 years later', '5 days ago'; that sort of thing. However, in the Zeta Project episode Quality Time, a casefile mentions that "Unit Zeta went renegade August 5, 2041", and in the BB episode Zeta, a character tells us that "six days ago [Zeta] went renegade", which means that the current date (according to that timeline) was Aug 11, 2041. The timing seems a little weird, unless you assume the schoolyear is different in the future, but YOU KNOW WHAT OH WELL.
Due to the timing of Beyond, Terry's character progression, and related clues, each season of Beyond seems to take place in aboooout a year - maybe more maybe less. All three seasons are unlikely to have taken place in less than two years. Anyway, if you take this assumption and run with it, you get season 1 of Batman Beyond beginning some time in 2039 or 2040, season 2 in 2040/1, and season 3 in 2041/2. RotJ, which is most likely post-series but set during s3 at the earliest, seems to either be taking place some time in the summer or after Terry has graduated from High School, possibly both. Either way, he does not have class. This would set it in 2041/2.
All of this math and guessing is supported by Tim's statement in RotJ, that what the Joker had done to him had happened "almost 40 years ago". As near as I can figure, Joker got Tim some time in 2004 or maybe early 2005, so if RotJ was set in 41/2, it would have been somewhere around 37 years ago.
So. There's one (or two if you wanna be nitpicky, but there's a difference of a few months) timeline that Beyond takes place in. It is not the only one.
JLU fast-forwards into the future a few times, and since Epilogue is the one with the solid date I'll start with it. According to that, Epilogue is set 65 years into the future. Now, in that episode, Dana says that she and Terry have been dating for 15 years, which means it is 14/5 years after season 1, probably 15. Epilogue was aired in 2005, and thus one assumes that the 65 years later bit is meant to be counted from 2005. Doing the math this way, Epilogue is set in 2070, and Beyond starts in 2055. This timeline pans with the other JLU crossover; The Once and Future Thing, parts 1 and 2. In that episode, Batman, Wonderwoman, and Green Lantern get sent time traveling and wind up about 50 years in the future, where they meet and fight alongside Terry and what remains of the future Justice League. I never much liked that episode, as Terry neither looks nor acts 25/6, but if you take this timeline into consideration, it makes sense. Terry is not 20-something -- in fact, he only just barely picked up the suit. OaFT takes place in an alternate reality that came about as the result of meddling with the timeline, and apparently Terry ended up joining the JLU almost as soon as he touched the suit here. Which explains, at least, his attitude and how easily he was apparently killed. It doesn't quite explain Bruce, but then what does? Bruce's attitude in Batman Beyond just in general is somewhat perplexing.
The last applicable crossover and episode that needs to be worried about is a crossover with Static Shock, the episode Future Shock. In this episode, which was aired in 2004, Static gets sent "over 40 years" into the future. Now, Static seems to have the same problems with aging that comic characters in general have, that thing where they can stay the same age for years upon end, so you could argue that this episode is supposed to be set as far back as 2001/2. That's as far as it's possible to go back, due to a line that Static says in another episode that pretty clearly marks the year as being past 2000. Still, odds are that we're supposed to be counting from 2004 and just ignoring ages in that way that one does. I mean if you tried to count so that the ages made sense in realtime, the Batman comics would still be set back in like 1950-something and THEN where would that leave you when somebody pulled out an ipod or the like?
Anyway.
So, according to Bruce, there's been a timeskip of "over 40 years." This means that the very earliest you could reasonably go would be 2042 (if you assume Bruce's statement to mean "40 years and a few months"), with 2045/6/7 or so being the most likely guess. It is not 2055 in this particular version of reality, because that would be over 50 years, and if Bruce was going to say anything you have to figure he wasn't purposely misleading the kid by dropping a decade. If we stick this episode in the first timeline it doesn't quite fit either. According to that, Terry would be post-RotJ by this time, and in the episode he's just... not. The Terry that appears in Future Shock is incredibly green, and still very much a punk kid with attitude problems. His characterization seems to most closely match s1, as well as his comment that they don't have visitors in the Batcave, not ever. In one of the last episodes of s1, Babs comes to visit. If she'd already come, that'd be contradictory to events as they were. In addition, Terry has apparently not memorized the batcomputer's files yet and has not seen any old pictures of Static (proven as he does not recognize him).
So there's a fourth timeline, that starts somewhere around 2045 or possibly a bit later.
The comics probably do their own thing, but afaik there hasn't been any solid dates, or even subjective dates, to work with yet, so they can go on doing it.
tl;dr: there are (at least) 4 distinct timelines, all of which are arguably canon. Personally I go with the show proper starting in the year 2039, but that's just me. Clearly, there's more than one valid option here.