using System;
using System.Runtime.InteropServices;
using Havit.Services.TimeServices;

namespace DiplomovaPrace.Services.TimeServices
{
	public class ApplicationTimeService : TimeZoneTimeServiceBase, ITimeService
	{
		protected override TimeZoneInfo CurrentTimeZone
		{
			get
			{
				if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
				{
					return TimeZoneInfo.FindSystemTimeZoneById("Central Europe Standard Time");
				}
				return TimeZoneInfo.FindSystemTimeZoneById("Europe/Prague"); // MacOS
			}
		}
	}
}
