Template is probably the way to go or do it in NodeRed maybe.
I have a Date/Time conversion node listed here that might give you some ideas.