Can time be perceived differently depending on a user's feeling? You often hear that time passes more quickly when you're having fun. And the opposite is also "true" in common belief, that when you're bored time is very slow. But we know that time is almost linear and constant.

Is there any scientific proof of that time is perceived differently depending on feeling or mood?
There's definitely scientific evidence that one's perception of time can be influenced by actions which in no way something's duration.  

It's not quite the happy/sad affect you're asking about, but it definitely suggests that one's perception of time can be meaningfully influenced by wholly unrelated information:

2010 Study: When doctors sit for patient consultations, they are perceived as staying longer, providing higher quality care

Patients consistently overestimated the time doctors spent with them much more when the doctors sat down while talking to them then when they remained standing.  (The multiple was about 85% higher relative to the actual for the doctors who sat.)