Going into dungeons and grinding to your heart's content doesn't pass time in the game.
Essentially the way the game works is you have two daily time slots: "After School" ("Afternoon" when there's no school) and "Evening." You are free to roam around the world and buy items and equipment during the afternoon for as long as you want. Time only progresses once you select an activity to use that time slot: hanging out with friends and confidants (which, in addition to giving you more background on the characters, unlock gameplay benefits), working on a stat (like working out for strength or studying for intelligence), working at a job for money, or going into the dungeon. You get a confirmation prompt for any of these indicating that you'll "spend your time" (AKA use the time slot). One dungeon dive only takes up one afternoon slot. You don't advance to night until you come back out of the dungeon; so you could stay in there for hours IRL grinding, and as long as you don't leave the dungeon to recover health and mana, it will still only use up your one afternoon.
Evenings are a little bit more limited. There are a bunch of confidants to spend time with and ways to level up your stats, but there's no dungeon diving at night. Also, if you go into the dungeon during the afternoon, you'll be "too tired to go out" in the evening and be limited to activities within the cafe you reside in. There is a confidant that if you spend enough time with you'll unlock a "special massage" (yes that is the term the game uses for it) that allows you to go out at night after dungeon diving in the afternoon, but it's a high rank of the confidant so you won't get that until later.
What most people do is blast through the current dungeon and beat the boss using as few time slots as possible, and then use the remaining days until the deadline to work on confidants and stats.