I'm trying to create a date object from a long (timestamp) in a karaf shell (karaf version=2.4)
It should be as simple as new java.util.Date 0
but it returns
Error executing command: Error when instantiating object of class java.util.Date
The stack trace is
java.lang.Exception: Error when instantiating object of class java.util.Date caused by java.lang.IllegalArgumentException at java.util.Date.parse(Date.java:615)[:1.7.0_55]
So it appears that it thinks that 0 is a string. Creating a variable doesn't seem to help :
> a = 0
> $a getClass
returns java.lang.Long
> new java.util.Date $a
returns the same error as above.
Any help ?