string llGetInventoryAcquireTime( string item );
Forced delay: 0.0 seconds. Energy: 10.0.
Returns a string with the timestamp that the item was added to the prim's inventory.
The time is in the UTC time zone in the format "YYYY-MM-DDThh:mm:ssZ"
Appears to be accurate to seconds.
If there is no other item in the inventory, you get the timestamp from the script itself.
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}
touch_start(integer total_number)
{
string item = llGetInventoryName(INVENTORY_ALL, 0); // 0 means the first item in prim's inventory.
string timestamp = llGetInventoryAcquireTime(item);
llSay(0, "Timestamp for: " + item + " - " + timestamp); // output
}
}