Does Stack Exchange use UTC time to store when a question, answer or comment is created, or is there any other approach to handle it to display localized time to the user?
Per What is an SE "day"? When does each day start?, the SE day is the UTC day. This applies to everything that's date-stamped on SE -- posts, comments, visits (to count toward the Fanatic badge), daily limits on reviews, and so on.
Localizing the dates isn't as easy as it sounds. What should SE use to determine your timezone, your IP address? That will be wrong if you use certain proxies. A user setting? That's additional data that needs to be collected and managed (including with a UI), and requests for user preferences have not fared well in the past.
However, SE does mitigate this somewhat. For recent times, the timestamp is presented as, for example, "17 minutes ago" or "3 hours ago" or even "yesterday". For non-recent events, I would argue that a difference of a few hours -- what you might gain through localization -- isn't that important. (If it was a week ago, does it really matter if it was 7 days 2 hours or 6 days 20 hours ago?)