The following week dragged by. Wednesday night found Hermione and Harry sitting alone in the common room, long after everyone else had gone to bed. The clock on the wall had just chimed midnight when the portrait hole burst open. Ron appeared out of nowhere as he pulled off Harry’s Invisibility Cloak. He had been down at Hagrid’s hut, helping him feed Norbert, who was now eating dead rats by the crate.The following week dragged by. Wednesday night found Hermione and Harry sitting alone in the common room, long after everyone else had gone to bed. The clock on the wall had just chimed midnight when the portrait hole burst open. Ron appeared out of nowhere as he pulled off Harry’s Invisibility Cloak. He had been down at Hagrid’s hut, helping him feed Norbert, who was now eating dead rats by the crate.HP:Philosopher's Stone - Chapter 14
‘No, no, no,’ said Hermione. ‘No, we’re not. Why don’t you go to bed, Neville?’ Harry looked at the grandfather clock by the door. They couldn’t afford to waste any more time, Snape might even now be playing Fluffy to sleep.‘No, no, no,’ said Hermione. ‘No, we’re not. Why don’t you go to bed, Neville?’ Harry looked at the grandfather clock by the door. They couldn’t afford to waste any more time, Snape might even now be playing Fluffy to sleep. HP:Philosopher's Stone - Chapter 16
Professor McGonagall pulled out a lace handkerchief and dabbed at her eyes beneath her spectacles. Dumbledore gave a great sniff as he took a golden watch from his pocket and examined it. It was a very odd watch. It had twelve hands but no numbers; instead, little planets were moving around the edge. It must have made sense to Dumbledore, though, because he put it back in his pocket and said, ‘Hagrid’s late. I suppose it was he who told you I’d be here, by the way?’
Peeves will tell you the time if you're unlucky
Peeves cackled.
‘Wandering around at midnight, ickle firsties? Tut, tut, tut. Naughty, naughty, you’ll get caughty.’
The portraits can also tell you the time in a limited fashion
By the time he got up to the portrait of the Fat Lady and pulled off his Invisibility Cloak, he was not surprised to find her in a most unhelpful mood. ‘What sort of time do you call this?’ ‘I’m really sorry – I had to go out for something important –’ ‘Well, the password changed at midnight, so you’ll just have to sleep in the corridor, won’t you?’