Jump to content

Get modification timestamp of notecard


Hooten Haller
 Share

You are about to reply to a thread that has been inactive for 508 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Is there a way to get the modification timestamp of a notecard in inventory? `llGetObjectDetails` `OBJECT_CREATION_TIME` returns an empty string. `llGetInventoryAcquireTime` returns the timestamp when the notecard came into the inventory; it's not updated when the NC is edited. The notecard's description reflects its creation time.

My objective is to know which version of a notecard is most recent. I may need to satisfy myself with manually bumping a number suffix on the name. That requires discipline and isn't reliable.

Link to comment
Share on other sites

As per the caveats on the wiki page for llGetObjectDetails, this function doesn't return information about items within an inventory.

Unfortunately we don't have access to that kind of metadata directly. However, you can indirectly access an approximation by keeping track of when the notecard's UUID changes - as it will get a new one when you save any edits to a notecard.

default
{
    state_entry()
    {
        llOwnerSay("pre-edit uuid: "+(string)llGetInventoryKey("test")
            +"\npre-edit time: "+llGetTimestamp());
    }
    
    changed(integer change)
    {
        if (change & CHANGED_INVENTORY)         
        {
            llOwnerSay("post-edit uuid: "+(string)llGetInventoryKey("test")
                +"\npost-edit time: "+llGetTimestamp());
        }
    }
}

 

Edited by Fenix Eldritch
  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 508 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...