Core/Calendar: Implement different timezone support for ingame calendar
Port From (https://github.com/TrinityCore/TrinityCore/commit/b888b1b09f71a8b8b4a9d45c804a1f164fb65ac3)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework;
|
||||
using Framework.Constants;
|
||||
using Game.Networking.Packets;
|
||||
using System;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
@@ -68,11 +70,14 @@ namespace Game
|
||||
|
||||
public void SendSetTimeZoneInformation()
|
||||
{
|
||||
// @todo: replace dummy values
|
||||
TimeSpan timezoneOffset = Timezone.GetSystemZoneOffset();
|
||||
string realTimezone = Timezone.GetSystemZoneName();
|
||||
string clientSupportedTZ = Timezone.FindClosestClientSupportedTimezone(realTimezone, timezoneOffset);
|
||||
|
||||
SetTimeZoneInformation packet = new();
|
||||
packet.ServerTimeTZ = "Europe/Paris";
|
||||
packet.GameTimeTZ = "Europe/Paris";
|
||||
packet.ServerRegionalTZ = "Europe/Paris";
|
||||
packet.ServerTimeTZ = clientSupportedTZ;
|
||||
packet.GameTimeTZ = clientSupportedTZ;
|
||||
packet.ServerRegionalTZ = clientSupportedTZ;
|
||||
|
||||
SendPacket(packet);//enabled it
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user