Pike <[EMAIL PROTECTED]> wrote:
> how do I calcute a node's creation time in milliseconds
> since the unix epoch ? I tried
>       long mage = node.getIntValue("age()")*24*60*60*1000;
>       long ctime = System.currentTimeMillis()-mage;
> but it gave strange results.

It is inpossible.

age() give age in whole days. so the above calculation should indeed give a
millisecond but with a granularity of a complete day.

> what is the filosophy behind the 'daymarks' builder anyway ?

It's a hack because there is no 'createtime' field in object. A daymark
object is created every night. (So your server must be up then, otherwise
you loose one!). Using the object number and the daymarks table an
estimation of the age of the object can be made then.


If you want better precision, a createtime field must be added. Perhaps we
the field types project could create the 'timestamp' field type, and then
it would be a matter of adding such a field to object.xml only.


Michiel


-- 
Michiel Meeuwissen 
Mediapark C101 Hilversum  
+31 (0)35 6772979
nl_NL eo_XX en_US
mihxil'
 [] ()

Reply via email to