@Override public NodeValue exec() { return XSDFuncOp.localTimezone(); } }
private NodeValue execAdjust() { // NOW is UTC in Jena to make the same whoever is looking. // For presentation reasons, you may want it in the (server) local timezone. // Calculate: // fn:adjust-dateTime-to-timezone(NOW(), fn:implicit-timezone()) // fn:adjust-dateTime-to-timezone(NOW(), afn:timezone()) // Query time, in UTC. NodeValue nv = SystemVar.get(ARQConstants.sysCurrentTime, super.functionEnv); // Timezone as xsd:dayTimeDuration. NodeValue nvTz = XSDFuncOp.localTimezone(); // Comes out as "Z", not "+00:00" because of cal.toXMLFormat() in NodeValue.makeDateTime return XSDFuncOp.adjustDatetimeToTimezone(nv, nvTz); }