Convert “now-1h” to UTC Time

I want to convert time format like “now-1h” to UTC Time. in java. Or, it can be recognized directly from something like Mysql.

Is there a way??
Is there a way to convert it to UTC time without analyzing it in regex in java? (now-1h, now-1d, now-1s, etc.)