From 3bf0f6c40722eb84c76c359d618d021d1af9c54c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 12 Jun 2020 20:02:55 +0100 Subject: [PATCH] do not display 0:xx:xx PM --- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 2 ++ OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 2f94647a07..942f15683a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1607,6 +1607,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } if (h > 12) return string.Format("{0}:{1:00}:{2:00} PM", h - 12, m, s); + if (h == 12) + return string.Format("{0}:{1:00}:{2:00} PM", h, m, s); return string.Format("{0}:{1:00}:{2:00} AM", h, m, s); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 231dc23c8b..981646c70d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -76,7 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_OSSL_Functions.osSetEstateSunSettings(sunFixed, sunHour); } - public double osGetCurrentSunHour() + public LSL_Float osGetCurrentSunHour() { return m_OSSL_Functions.osGetCurrentSunHour(); }