Gets the time in seconds since midnight in the simulator server's time zone. The local time zone is either PST or PDT, depending upon the time of the year, as California observes Daylight Saving Time. The time that it returns is the same as the in-SL clock.

To get the current time in GMT, use

How to convert this into hours, minutes and seconds:

integer t; integer hours; integer minutes; integer seconds; t = (integer)llGetWallclock(); // seconds since midnight // one hour has 3600 seconds hours = t / 3600; // get hours (integer division chops off the decimals) // the modulo operator % gets the remainder of a divison // in this case, the remaining seconds after removing the full hours minutes = (t % 3600) / 60; // divide by 60 because we want minutes, chops off decimals again seconds = t % 60; // get the seconds that didn't fit into full minutes

Compare with

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Simulator | Time

There is no comment on this page.
[Display comments/form]