This is actually doable -- easy, even.
For infrared, as @overlord has noted, there would be difficulties that might make it not worth your while. On the other hand, it depends on the use case:
- infrared radiation is absorbed by water (thus, by the crystalline in the eye), so that only a fraction would reach the retina. Granted, evolutionary changes might lead to a crystalline formulation that's less absorbant in the IR range.
- body heat would create a noise background against which the IR signal would have to compete. The human ear is quite capable of recognizing sounds among the noise, and the same can be done by the eye. This capability would, for a certainty, extend to IR signal decoding, but would that be enough? I am quite confident that you wouldn't be able to read a newspaper printed in IR ink, but you might be able to spot Vitons.
You cannot change the spectrum response of a cone because it depends on which opsins it contains, and the frequency response of those is fixed. But there is nothing in principle preventing supplemental opsins to be synthesized in response to specific conditions (this already happens, to some extent) - or permanently.
Some fish have an opsin with λmax = 370 nm, allowing to see ultraviolet. A first mutation to create a fourth population of photoreceptors using almost the same opsin they already do (this, too, already happens, albeit only in human females - so called tetrachromaticity), then the extra opsin mutates and becomes sensitive to infrared, giving (for example) a night hunting advantage. The receptor would probably be continuously "photobleached" in daylight, and would slowly regenerate as soon as it's dark - not unlike how rhodopsin night vision is acquired.
Another possibility is some mechanism enhancing the capture sensitivity of existing opsins. This way, the eye becomes "simply" more adept at detecting light at different wavelengths.
Update: infrared vision
We start with a mutation similar to one that already happened in human's branch of vertebrates (and too many times in the case of the mantis shrimp): the doubling and mutation of the gene sequence for an opsin, giving rise to a fourth type of retinal cone (or rod). This new opsin has a sensitivity peak shifted toward the infrared ("Rhodopsin-X", in green), and is proportionally more sensitive, so during daytime the receptors are photobleached, and not used by photopic vision. This already happens to some extent with rod photosensors.
Then, the opsin further mutates, until its peak lies well into the near infrared range ("Rhodopsin-X", in red).

When scotopic vision kicks in (at dusk, below one thousandth candle per square meter), also Rhodopsin-X starts regenerating, with relaxation time similar to normal rhodopsin, therefore between 30 and 45 minutes, which satisfies the "one hour" constraint of the OP.
We now have near-infrared vision. This will be comparatively weak, though, because infrared is significantly absorbed by water... and the human eyeball is filled with water. So, the retina could only detect the fraction of the IR signal which survives passage through the crystalline.
To have voluntary NIR vision, we would need to add a further modification: a nictitating membrane transparent to infrared, but opaque to visible light. This could take the form of a very thin membrane with a high content of a specialized melanine analogue. It would never be able to shut out the daylight at any significant photopic intensity, but it could allow to switch between mesopic vision and NIR vision. And, however, in full daylight and in the Sun's heat, most infrared information would probably be blotted out anyway.
Note that even then, closing the membrane would not have any effect for several minutes, with full NIR vision only achieved after 30-45 minutes. And in that period the membrane would need to stay closed, blocking ordinary vision. BUT it would be possible to close one membrane, regenerating vision in that eye, and using the other to see visible light.