Looks like you are using XSLT 1.0. Date/time manipulation is much easier in XSLT 2.0, so switch to 2.0 if that's an option. Some XSLT 1.0 processors allow calling out to Javascript, others to Java, so calling an external function might be an option if your code doesn't have to be portable.
The other option is to use date:add-duration() from
www.exslt.org. (The epoch date, if I remember correctly, is the number of seconds since 1 Jan 1970, so you can convert it to a proper timestamp by treating it as a duration and adding it to the baseline date/time).
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference