Most of the methods of TimeZone are instance (as opposed to static)
methods, which means you need to pass in as the first parameter an
instance of the TimeZone. The easiest way to create an instance in this
is to use the static method getDefault().

The easiest way I can think of to get the offset is:

tz:getOffset(tz:getDefault(), jsystem:currentTimeMillis())

where tz is mapped to java.util.TimeZone and jsystem is mapped to

Given what you are doing, you may want to actually add in 30 days to
what jsystem:currentTimeMillis() so you are getting the offset that it
will be 30 days in the future, since it may be different than what it is


Father Ramon wrote:
> Father Ramon, and others,
> I have tried the jave.util Class TimeZone but am disappointed with the
> result. It appears that the TimeZone functions I need and as listed in
> are not all
> available in a NetWare 6.5 SP5 environment. I've attempted to use
> getDisplayName, getDefault(), getDstSavings(), getRawOffset() and
> getTimeZone(ID). Most of them return with an error, one with an unexpected
> value.
> For example:
> Error evaluating XPATH expression 'token-xpath("gettz:getDSTSavings()")' :
> com.novell.xml.xpath.XPathEvaluationException: No extension function found
> for 'gettz:getDSTSavings()'.
> Here's a different result (without timestamps or driver name):
> ST: Action:
> do-set-local-variable("RACF-dst-time-zone",token-xpath("gettz:getDefault()")).
> ST: arg-string(token-xpath("gettz:getDefault()"))
> ST: token-xpath("gettz:getDefault()")
> ST: Token Value: "com.novell.xsl.extensions.JavaObject@1382926" .
> ST: Arg Value: "com.novell.xsl.extensions.JavaObject@1382926" .
> Curiously, a colleague who used an XSLT stylesheet was able to get more
> meaningful info from getDefault() but not the other functions.
> Some more light on the problem would be very much appreciated,
> Regards, Mike.