summaryrefslogtreecommitdiff
path: root/asm/rich4_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'asm/rich4_time.c')
-rw-r--r--asm/rich4_time.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/asm/rich4_time.c b/asm/rich4_time.c
new file mode 100644
index 0000000..fafac33
--- /dev/null
+++ b/asm/rich4_time.c
@@ -0,0 +1,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;
+}