Is "when" a preposition?

I had to come up with an "edit-the-mistakes" worksheet for a Special Education student on-the-fly. One of my offerings was this sentence:

When I was three years old I can tie my shoes.

I had intended the correction to be this sentence:

When I was three-years-old, I could tie my shoes.

I know that my sentence correction is stylistically weak; however, I believe it is grammatically correct. A coworker "corrected" me in front of my student saying that it did not need a comma, but my thought was that "when" is being used as a preposition. My question is this: is the phrase "When I was three-years-old" a prepositional phrase? I looked at a number of prepositional word lists online and "when" does not appear on any of them.


Solution 1:

In a comment, StoneyB answered:

Depends on what grammatical sect you belong to. In traditional grammar when is a subordinating conjunction; in the Cambridge Grammar of the English Language it's a preposition. In neither case is a comma required. ... And the hyphens are neither required nor desirable.

Solution 2:

"I could tie my shoes." can stand on its own as a complete sentence.

I believe that "When I was three years old" is an adverbial clause. It modifies the verb "could tie" and, as do all adverbial clauses, this one contains a subject and a verb.

"When" is most often an adverb as it usually modifies a verb indicating time.