editor variable with pattern "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"

Having trouble installing Oxygen? Got a bug to report? Post it all here.
emmam
Posts: 16
Joined: Sat Jul 28, 2012 11:41 am

editor variable with pattern "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"

Post by emmam »

Hi

I'd like to use an editor variable for a time stamp

with the following pattern :"yyyy-MM-dd'T'HH:mm:ss.SSSXXX" (found on this page the oxygen documentation indicates http://docs.oracle.com/javase/7/docs/ap ... ormat.html)

But what should I put as pattern in my template eg "$date(pattern)"

my example produce an empty @when attribute with OxygenEditor 16.0

<revisionDesc>
<change who="${ask('Identifiant du créateur du fichier (initiales)')}"
when="${date(yyyy-MM-dd'T'HH:mm:ss.SSSXXX)}">file creation</change>
</revisionDesc>

Thanks for your help

best regards

Emmanuelle
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: editor variable with pattern "yyyy-MM-dd'T'HH:mm:ss.SSS

Post by adrian »

Hi,

On what platform are you running Oxygen (Windows, Linux, Mac)?
If you're on a Mac, check the Java runtime version that Oxygen is using in Help > About, System properties, java.runtime.version.
If it's 1.6. (Java 6), it won't work with 'X' in the pattern ('X' was introduced in Java 7):
http://docs.oracle.com/javase/6/docs/ap ... ormat.html

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
emmam
Posts: 16
Joined: Sat Jul 28, 2012 11:41 am

Re: editor variable with pattern "yyyy-MM-dd'T'HH:mm:ss.SSS

Post by emmam »

You were right I'm using MacOS.
I updated Java : says MacOs is using Java 8 update 31 now.
But the Java runtime version that Oxygen is using is still 1.6 ...
Seeing that I updated my Oxygen editor version to 16.1 but the runtime is still set to 1.6...
What should I do ?
thanks
emmanuelle
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: editor variable with pattern "yyyy-MM-dd'T'HH:mm:ss.SSS

Post by adrian »

Hi,

If must use this pattern that requires Java 7 or later, please download the Oxygen distribution of OS X that bundles a Java runtime (Java 8 for v16.1):
http://www.oxygenxml.com/InstData/Edito ... gen.tar.gz

The .zip distribution of OS X only works with Java 6, it does not detect Java 7 or later.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply