diff --git a/Controllers/API/BookingsAPI.cs b/Controllers/API/BookingsAPI.cs index 1e7dc4f..d7cbedb 100644 --- a/Controllers/API/BookingsAPI.cs +++ b/Controllers/API/BookingsAPI.cs @@ -7,6 +7,7 @@ using PSTW_CentralSystem.DBContext; using System.ComponentModel.DataAnnotations; using System.Text.Json; using System.Text.Json.Serialization; +using System.Runtime.InteropServices; namespace PSTW_CentralSystem.Controllers.API { @@ -17,7 +18,9 @@ namespace PSTW_CentralSystem.Controllers.API { private readonly CentralSystemContext _db; private readonly ILogger _logger; - private static readonly TimeZoneInfo AppTz = TimeZoneInfo.FindSystemTimeZoneById("Asia/Kuala_Lumpur"); + private static readonly TimeZoneInfo AppTz = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) + ? TimeZoneInfo.FindSystemTimeZoneById("Singapore Standard Time") + : TimeZoneInfo.FindSystemTimeZoneById("Asia/Kuala_Lumpur"); public BookingsAPIController(CentralSystemContext db, ILogger logger) {