The Keen Mind feat (PHB, p. 167) says:
You have a mind that can track time, direction, and detail with uncanny precision. You gain the following benefits.
- Increase your Intelligence score by 1, to a maximum of 20.
- You always know which way is north.
- You always know the number of hours left before the next sunrise or sunset.
- You can accurately recall anything you have seen or heard within the past month.
This seems to imply that, by default, a character does not necessarily know "the number of hours left before the next sunrise or sunset" or remember what they may have read in books regarding reading time by the stars, planets, or sun position.
Is there any temporal information that characters necessarily know by RAW, or is it all up to the DM's judgment with respect to the situation (e.g. a Knowledge check for astronomy, or access to a town square where a calendar might be posted)? For example, if PC's have been imprisoned in a windowless cell, they might not know the exact clock time or even the correct time of day, but they intuitively know the exact number of calendar days that have passed since they were thrown in.