Loading...
Gets the set RTC time
Date time in UNIX Date time format
[DllImport("RGUSBdrv.dll", CallingConvention = CallingConvention.Cdecl)] public static extern UInt32 GetDateTime();
public static DateTime GetDateandTime() { uint uDateTime; uDateTime = GetDateTime(); return DateTimeOffset.FromUnixTimeSeconds(uDateTime).DateTime; } private void button1_Click(object sender, EventArgs e) { if (Connected) label1.Text = GetDateandTime().ToString(); }