summaryrefslogtreecommitdiff
path: root/csrc/rich4_time.c
blob: fafac33a8862aea60701c2a38988859067e80f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * Copyright (C)  2018 Iru Cai <mytbk920423@gmail.com>
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include <windows.h>
#include "rich4_time.h"

void get_local_time(rich4_time *t)
{
  SYSTEMTIME st;
  GetLocalTime(&st);
  t->day = st.wDay;
  t->month = st.wMonth;
  t->year = st.wYear;
  t->dayofweek = st.wDayOfWeek;
}