Where and when did your time machine break?
Preparation is half the battle. Doing your homework before stepping through any kind of space-time portal might not be the sexy thing to do but could save you from being eaten by a dinosaur or sacrificed to the deity du jour. Memorise key historical and geographical landmarks, learn about astronavigation, what animals lived where when… and come prepared to be eaten and/or sacrificed.
As a history major, I don't think that determining where and when I was would be much of a problem, at least once I got the language thing worked out.
The problem would be trying to send messages for help without giving yourself away.
Long ago Science Fiction determined that the best way to do that would be to sneak messages into time capsules, cornerstones of buildings, tombs, etc. Still it might be hard for your rescuers to locate you.
Then I saw this, https://www.youtube.com/watch?v=VrZghGJZP6M and realized that you could just go to the market in a large city and be a "busker", play songs like this on ancient instruments. The locals won't recognize it, but anyone from almost any era that has time travel will recognize that, and approach you.
I guess another question is, how important is it to the character to actually know the time and place? Depends on your story, and why this person has time travelled. If you go in blind, with no chance to prepare, and there is nobody nearby, the more important skills are probably basic survival skills - can you live off the land, defend yourself, find shelter, etc. The time period is kind of irrelevant unless you encounter other people.
The stars could be useful for general information about latitude and time of year, but unless you're travelling many thousands of years, its unlikely they will be useful for determining how far back you've travelled, even if you know what to look for. One key indicator could be recorded supernovas, but that's kinda like throwing a dart into a stack of hay and hitting the proverbial needle. And it would require prior knowledge of those events.
Asking Google/a friend could help with astronomical information, possibly with flora/fauna as well, although the further back you travel, the more likely any species you encounter is not one we have a record of.
A tool you could use, if you had enough knowledge, would be setting up a "sundial" of sorts. Even if you don't have an accurate timepiece, you can record the angle and length of the shadow at dawn and dusk and estimate the latitude/time of year. Combined with some astronomical observations, that would help with the "where" question.
While you've got Google on the line, figuring out the fairly precise location of all the planets would narrow down the options for when. Given knowledge of the orbital times and locations in present day, you could calculate a fairly limited set of possibilities for where all the planets are relative to Earth at that given time of year. A couple of observations would give you several but not all of the planets, but the more you observe over time would reduce the options that match by adding more planets to the list.
My first thought was to take the Marty McFly approach and just check the newspaper, but I suppose that won't work for the majority of these scenarios.
Assuming you could figure out exactly where you are and you just needed a rough idea of your time period, all you really need to do is throw an item you brought into the nearest lake and then ask Trish in which sedimentary layer of the future dried up lakebed the archeologists found your anachronistic item. Do check to make sure the lake is actually dried up in Trish's time period before throwing your stuff in.