Hi,

I'm having some trouble translating a java snippet into Jess syntax.
Specifically, is it feasible to write the following java in a rule RHS:

     TimeZone tz = TimeZone.getTimeZone("GMT-5:00");
     tz.setID("EST");
     TimeZone.setDefault(tz);
     System.out.println (
       new SimpleDateFormat("MMM dd yyyy kk:mm:ss zzz").format(new
Date()));


My futile attempts look something like:

 (bind ?tz (new java.util.TimeZone (call getTimeZone "GMT-5:00" )))
 (call ?tz setID "EST")
 (printout t "the date is "
 (call format (new java.text.SimpleDateFormat "MMM dd yyyy kk:mm:ss
zzz")
               (new java.util.Date) )
   crlf)
... and several permutations thereof, all of which fail miserably.


1) Is this even possible in Jess? (I know some one line java calls work
in JESS, but that's about it...)
2) What does the Jess syntax for the above look like?
3) Is there any documentation of Java->Jess syntax translation.(I have
looked in the JESS doc and see some examples of java in jess, but no
explicit definitions)

Thanks, Jack

PS The time zone code is to force EST no matter where this is run, and
get around 'daylight savings time' features of the (somewhat obfuscated)
date classes...

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to