
This function returns true if SL time is currently experiancing daylight saving time, false if other wise (note: SL time == PST)
Here it is:
CODE
integer getDaylightSaving() //returns TRUE if current date is withen daylight saving time.
{
list datesplit = llParseString2List(llGetDate(),["/"],[]); //mm/dd/yyyy
integer month = llList2Integer(datesplit,0);
integer day = llList2Integer(datesplit,1);
integer year = llList2Integer(datesplit,2);
if(month > 4 && month < 10) return TRUE;
else if(month < 3 || month > 10) return FALSE;
else if(month == 4)
{
if(day > 6) return TRUE;
if(getDay(llGetDate()) == "sunday") return TRUE;
else return FALSE;
}
else if (month == 10)
{
if(day > 26) return FALSE;
if(getDay(llGetDate()) == "sunday") return FALSE;
else return TRUE;
}
else return FALSE;
}
I would really like ppl to not use this in stuff they plan on selling, if you are... then, I wish I could say 'you must' post your code here. ::Wishes there were some sort of GNU private license of some sort that applys to SL scripts
