I just bought a Canon EOS M mirrorless camera but the date of import is December 2012, nearly 18 months ago. Should that be a problem?
I see no problem there.
The only thing that might get affected by this length of time is the battery, and even that is most likely good as new as long as you received the camera in an unopened package and the battery was in its own little plastic bag straight out of the assembly line.
The firmware version is likely the first version of this model. You should check and update as needed. The new firmware is a real update, not just cosmetics.
Don't worry — it's not fresh fruit.
As Esa notes, the main thing that might be time-dependent is the battery life, because lithium batteries lose capacity over time even when not in use. However, it's likely that the battery was packaged in a state that minimizes this. I wouldn't worry about it. (A second new battery is nice to have anyway, by the way — that way you can have one in the camera and one charging or charged and ready to go.)
Electronics are often made in big production runs. If they don't fly off the shelf, it may be a while until the next batch is even made. The thing you do get, though, is a big discount: when this camera was new, and for about a year, it sold for close to its list price of $800, but it's dropped steeply since then.
Things to consider:
Is it for just saving memories of some events or more than that? Do plan to use it for some serious hobby and want to extend into using more gadgets and with other equipment or not?
Even if it's a newer model or a later date of import, functionality is always a concern. This topic here about shutter actuation should be considered when buying a second-hand camera.
Doing a little research of the price may help you decide whether to buy it or not.
I mean, even if it's an old mechanical model if you like it anyway, there's no problem with that.