Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Would you like a redo of llGetDate() ?

Kiki Vansant
Registered User
Join date: 26 Jan 2007
Posts: 6
07-30-2007 21:30
Is there anyone else out there who would get behind passing a variable through llGetDate(), where llGetDate(0) returns today, llGetDate(-1) returns yesterday, llGetDate(1) returns tomorrow, etc. ?
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
07-31-2007 11:10
Why not just use llGetUnixTime() and subtract or add 86400 seconds?
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Kiki Vansant
Registered User
Join date: 26 Jan 2007
Posts: 6
Method for converting llGetUnixTime()
07-31-2007 11:41
Is there a smooth way to translate the result of llGetUnixTime() into a string of YYYY-MM-DD format? It would have to be something that observes the 28,29,30 & 31 day months.
Jhary Priestly
JPC
Join date: 18 Jan 2007
Posts: 19
08-02-2007 09:13
Compare the function described at http://rpgstats.com/wiki/index.php?title=LlGetTimestamp (-> llGetTimestamp)
Kiki Vansant
Registered User
Join date: 26 Jan 2007
Posts: 6
I don't see how llGetTimestamp() helps
08-02-2007 10:49
It doesn't appear that llGetTimestamp() gives you the data for any moment but the present, either.

How do you suggest finding the date of tomorrow, while keeping in mind that the number of days in months vary...and leap years exist?
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
08-02-2007 11:07
Personally, I just XML-RPC it at the moment. However, that would be a useful function to have in-world.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Jhary Priestly
JPC
Join date: 18 Jan 2007
Posts: 19
08-02-2007 14:00
The function in the comments calculates the date back to an integer. Means you can follow the algorythm described there to add (subtract) dates (time).
Kiki Vansant
Registered User
Join date: 26 Jan 2007
Posts: 6
08-02-2007 20:59
Yes...but how do I get that back to YYYY-MM-DD format? That is what I'm ultimately after.
Loretano Dagostino
Registered User
Join date: 12 May 2007
Posts: 3
Yes, and more date/time functionality
08-28-2007 16:04
In my opinion, as a kind of a global collaboration software (dont find better words right now to express my thoughts), LSL lacks of a proper date/time format that is able to properly handle the various date/time formats. We need things like UTC, local time, DST, functions to calculate time differences or adjust date/time values by certain values like numer of days, hours, seconds or whatever you need.

How difficult ist it right now, just to get the correct date for PDT. That shouldn't be that way. LSL needs better support for this kind of operations.