/*
* Author:          Patrick-Christopher Mattulat
* Co-Author:       Claude Sonnet 4.6 (LLM)
* Company:         Lynar Studios
* E-Mail:          webmaster@lynarstudios.com
* Created:         2023-04-01
* Changed:         2026-06-23
*
* */

#include <ls-std/time/common/DateParameterMapper.hpp>
#include <ls-std/time/system-time/WindowsClock.hpp>
#define NOMINMAX
#include <windows.h>

using ls::standard::time::DateParameter;
using ls::standard::time::DateParameterMapper;
using ls::standard::time::WindowsClock;

WindowsClock::WindowsClock() = default;

WindowsClock::~WindowsClock() noexcept = default;

bool WindowsClock::setTime(const DateParameter &_dateParameter)
{
  const SYSTEMTIME systemTime = DateParameterMapper::toWindowsSystemTime(_dateParameter);
  return SetLocalTime(&systemTime);
}
