aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorMelanie2010-11-17 18:21:35 +0000
committerMelanie2010-11-17 18:21:35 +0000
commit3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816 (patch)
tree2c25eecf06d4dae3045b6ce5c66719ef15a27517 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentFix gesture and viewer preview sounds not playing (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816.zip
opensim-SC_OLD-3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816.tar.gz
opensim-SC_OLD-3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816.tar.bz2
opensim-SC_OLD-3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-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 7ce3716..26ef0dd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2311,5 +2311,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2311 }); 2311 });
2312 return result; 2312 return result;
2313 } 2313 }
2314
2315 /// <summary>
2316 /// Convert a unix time to a llGetTimestamp() like string
2317 /// </summary>
2318 /// <param name="unixTime"></param>
2319 /// <returns></returns>
2320 public LSL_String osUnixTimeToTimestamp(long time)
2321 {
2322 CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp");
2323 long baseTicks = 621355968000000000;
2324 long tickResolution = 10000000;
2325 long epochTicks = (time * tickResolution) + baseTicks;
2326 DateTime date = new DateTime(epochTicks);
2327
2328 return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
2329 }
2314 } 2330 }
2315} 2331} \ No newline at end of file