I've recently begun noticing that occasionally I'll see a dictionary form of the verb followed by the particle に, for example:
1.)まだ学校へ行くには早い時間です。 It's still too early to go to school.
I've been kind of confused by it since from my experience normally the dictionary form of verbs are followed by a nominalizer の or こと before a particle. For example:
2.)まだ学校へ行くのは早い時間です。
3.)まだ学校へ行くのに早い時間です。
What is the general function of に directly following the dictionary form of a verb and how is it generally used? How would sentence 1's meaning differ from sentences 2 and 3?