The signs of k and m are immaterial. If they are negative or positive in one place, then they are in any other as well. You can't "associate" the negative sign with them.
The solution to the ODE
\frac{d^2x}{dt^2} = -\alpha x(t)
is always
x(t) = Ae^{-i\omega t} + Be^{i\omega t}
where \omega = \sqrt{\alpha}. If \alpha happens to be negative then taking the square root will give you another i and you'll get real exponents once simplified.
Alternatively you could group constants and just solve
\frac{d^2x}{dt^2} = \beta x(t)
where \beta = -\alpha. This would have the solution
x(t) = Ae^{\gamma t} + Be^{-\gamma t}
where \gamma = \sqrt{\beta} = \sqrt{-\alpha} = i\sqrt{\alpha} = i \omega so you get the same result as before.
In the case of your particular equation, you just have \alpha = \frac{k}{m} so you get the familiar
\omega = \sqrt{\frac{k}{m}}
As to your question, mathematically, the reason that you need the \omega t instead of just t is that otherwise your "solutions" simply won't satisfy the DE.
Take x(t) = \cos{t}. Then
\frac{dx}{dt} = -\sin{t} \Longrightarrow \frac{d^2x}{dt^2} = -\cos{t} = -x(t) \neq -\frac{k}{m}x(t)[/itex]<br />
<br />
on the other hand taking x(t) = \cos{\omega t} gives<br />
<br />
\frac{dx}{dt} = -\omega \sin{\omega t} \Longrightarrow \frac{d^2x}{dt^2} = -\omega^2 \cos{\omega t} = -\omega^2 x(t) = -\frac{k}{m}x(t)[/itex]<br />
<br />
as you wanted.<br />
<br />
This makes sense from a physics perspective, since I don&#039;t think you&#039;d really expect periodic things in nature to have periods of 2\pi (this would make things way too easy! <img src="https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png" class="smilie smilie--emoji" loading="lazy" width="64" height="64" alt=":smile:" title="Smile :smile:" data-smilie="1"data-shortname=":smile:" />)