Yes I would say using xhive:last-modified(...) is the easiest way, but if you really want to use the timestamp then here is something that I've used in the past:
declare function local:timestamp-to-dateTime($v) as xs:dateTime {
xs:dateTime("1970-01-01T00:00:00-00:00") + xs:dayTimeDuration(concat("PT", $v idiv 1000, "S"))
};
local:timestamp-to-dateTime(number("1375875821721"))