aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorMelanie2010-11-17 18:20:41 +0000
committerMelanie2010-11-17 18:20:41 +0000
commit0d72d776296668813eac7019e932e4d4bc0affe3 (patch)
tree78499230c77a595ffdd8646c0dcc453369874fba /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentFix gesture and viewer preview sounds not playing (diff)
parentAdd osUnixTimeToTimestamp() (diff)
downloadopensim-SC-0d72d776296668813eac7019e932e4d4bc0affe3.zip
opensim-SC-0d72d776296668813eac7019e932e4d4bc0affe3.tar.gz
opensim-SC-0d72d776296668813eac7019e932e4d4bc0affe3.tar.bz2
opensim-SC-0d72d776296668813eac7019e932e4d4bc0affe3.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index e6a323e..fc92f23 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2298,5 +2298,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2298 }); 2298 });
2299 return result; 2299 return result;
2300 } 2300 }
2301
2302 /// <summary>
2303 /// Convert a unix time to a llGetTimestamp() like string
2304 /// </summary>
2305 /// <param name="unixTime"></param>
2306 /// <returns></returns>
2307 public LSL_String osUnixTimeToTimestamp(long time)
2308 {
2309 CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp");
2310 long baseTicks = 621355968000000000;
2311 long tickResolution = 10000000;
2312 long epochTicks = (time * tickResolution) + baseTicks;
2313 DateTime date = new DateTime(epochTicks);
2314
2315 return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
2316 }
2301 } 2317 }
2302} 2318} \ No newline at end of file