Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Question about llGetDate

Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
02-06-2009 08:26
I found a program in the forum here for a visitor counter. I placed it in some objects and check them daily, but I hadn't paid too much attention to the dates it until i came to look at who visited since yesterday (Feb 5th). I know for a fact that I had friends come at about 16:50. Well this morning, at about 7:00 SLT, I checked the counter and they were in the list, but it showed the were here at 16:50 but with a date of Feb 6. That would not be possible since 16:50 on the 6th has not occurred yet.

I think I see where the problem is in the script. It uses llGetWallClock, which uses SL time, but then it tags on llGetDate which is UMT time. So at 16:50 on Feb 5th, it would be a date of Feb 6th UMT.

Here is the snip of code for that:
CODE

if( llDetectedKey( i ) != llGetOwner() )
{
string detected_name = llDetectedName( i );
if( isNameOnList( detected_name ) == FALSE )
{
float seconds = llGetWallclock();
float minutes = seconds / 60.0;
float hours = minutes / 60.0;
integer hours_int = (integer) hours;
integer minutes_int = ((integer)minutes) % 60;
if( minutes_int < 10 )
{
visitor_list += (string) hours_int + ":0" + (string) minutes_int + " " + (string) llGetDate();
}
else
{
visitor_list += (string) hours_int + ":" + (string) minutes_int + " " + (string) llGetDate();
}

visitor_list += detected_name;
CODE


I don't see an LSL function that returns the SL date, so would this mean I need to check the time and parse the date to knock the day back by one (and year if its Dec. 31)?

Thank you.
Dmitriy
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
02-06-2009 08:33
for my visitor list that works similarly, i just use llGetTimeStamp
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
02-06-2009 08:36
http://www.lslwiki.net/lslwiki/wakka.php?wakka=llGetDate
if you not read it already:)
_____________________
From Studio Dora
Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
02-06-2009 09:20
Ahhh thank you Dora. :-)

**note, I looked at llGetTimeStamp but I think that is also UMT, but with the time and date together. This function should do the trick
Nexii Malthus
[Cubitar]Mothership
Join date: 24 Apr 2006
Posts: 400
02-06-2009 10:19
I'd recommend to use the new updated wiki than the old abandoned one.
http://wiki.secondlife.com/wiki/LlGetDate
_____________________

Geometric Library, for all your 3D maths needs.
https://wiki.secondlife.com/wiki/Geometric

Creator of the Vertical Life Client
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
There's a function?!?!?
02-06-2009 13:35
that gets you a date? Kool.
_____________________
So many monkeys, so little Shakespeare.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
02-06-2009 13:58
I was going to ask if llGetDate had something to do with the escort thread. :D
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
02-06-2009 21:45
From: Argent Stonecutter
I was going to ask if llGetDate had something to do with the escort thread. :D

will it get you dates with MLP?
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
Final Resolution
02-12-2009 19:53
After going back and forth with my ISP and Linden Labs, each asking me to have the other look into the situation further, it was agreed that my ISP was blocking the mail from second life. It apparently was being blocked by a 3rd party spam control system before it even reached my inbox with my ISP. Considering how many emails get sent by objects on a daily basis in Second Life, it would be near impossible to access a copy of the suto return email and seek some rectification to remove Second Life from the list. Since there seems to be no block when I use a gmail account, I changed my scripted object to that, changed my main email address with Second Life to that. It's working fine now.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-12-2009 22:22
From: Nexii Malthus
I'd recommend to use the new updated wiki than the old abandoned one.
http://wiki.secondlife.com/wiki/LlGetDate

I usually refer to lslwiki.net, whcih still has much better documentation in many areas. When I find it lacking (usually only for the very new functions) I visit the official LSL Portal and SOMETIMES find more info than that on lslwiki.net. I definitely wouldn't discount that "old abandoned" wiki.