Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetPSTDate()

Oz Spade
ReadsNoPostLongerThanHand
Join date: 23 Sep 2003
Posts: 2,708
02-23-2004 11:46
string llGetPSTDate()

What this would do: Return the current PST time zone date in YYYY-MM-DD format.

Why: We have llGetDate() but that returns UTC date and is not always desirable. Making a script that converts UTC to PST date would be a pain in the ass if not impossible. (well it would be possible but buggy and unreliable)

Hopefully this would be rather simple to implement and could come in handy.
_____________________
"Don't anticipate outcome," the man said. "Await the unfolding of events. Remain in the moment." - Konrad
Liberty Tesla
Perpetual Newbie
Join date: 1 Sep 2003
Posts: 173
02-23-2004 12:33
That never did make sense to me, that llGetTime() (is that right? I don't have the LSL refs at had) returns PST, while llGetDate() returns UTC. That confused me terribly when I was trying to create an object that sent an email that included dates and times.

It may be gilding the lily, but I think we should have date and time functions that take two arguments: one for the timezone (an integer offset from UTC, I suppose), and one to indicate whether daylight savings applies. With predefined constants for UTC and PST/PDT.
Kex Godel
Master Slacker
Join date: 14 Nov 2003
Posts: 869
02-23-2004 13:35
I enthusiastically support this product and/or service.
Oz Spade
ReadsNoPostLongerThanHand
Join date: 23 Sep 2003
Posts: 2,708
02-23-2004 16:44
It would totaly kick ass if you could declair time zones for both llGetDate and llGetTime, and even daylight savings.

To make sure old scripts aren't broken maybe have it so if left blank it just returns the default.

So it would work like:

llGetDate(string time_zone, integer daylightsavings);

Where time_zone would be EST-PST etc. and daylightsavings would be TRUE or FALSE.

And if its...

llGetDate();

Then it just returns how it normaly would.

If thats not possible then I'd be happy just with llGetPSTDate()
_____________________
"Don't anticipate outcome," the man said. "Await the unfolding of events. Remain in the moment." - Konrad