title: Modify system date using Win32SetSystemTime in C# (only date, no hour, minute, second)
body: <p>Is possible to set the system time (using <code>Win32SetSystemTime</code>) without changing hour, minute and second (only year, month and day)? </p>
  
  <p>Here is my code. As you can see, I commented falseData.Hour, falseData.Minute and falseData.Second because I don't want to change them. With this code, however, system time is automatically setted on 01:00:00.
  Manually, I can change the system date without changing hour, minute and second (by clicking the clock of the taskbar), but programmatically?</p>
  
  <p>Any help will be appreciated. 
  Thanks. Marco</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Globalization; 
  using System.Runtime.InteropServices; 
  
  namespace SysData1_0
  {
      public partial class Form1 : Form
      {
          public struct SystemTime
          {
              public ushort Year;
              public ushort Month;
              public ushort DayOfWeek;
              public ushort Day;
              public ushort Hour;
              public ushort Minute;
              public ushort Second;
              public ushort Milliseconds;
          };
  
          [DllImport("kernel32.dll", EntryPoint = "GetSystemTime", SetLastError = true)]
          public extern static void Win32GetSystemTime(ref SystemTime sysTime);
  
          [DllImport("kernel32.dll", EntryPoint ="SetSystemTime",SetLastError=true)]
          public extern static bool Win32SetSystemTime(ref SystemTime sysTime);
  
          public Form1()
          {
              InitializeComponent();
          }   
  
          private void buttonImpostaDataFittizia_Click(object sender, EventArgs e)
          {
              SystemTime falseData = new SystemTime ();
              if (comboBox.SelectedIndex == 0)
              {
                  falseData.Year = (ushort)2015;
                  falseData.Month = (ushort)3;
              }
  
              if (comboBox.SelectedIndex == 1)
              {
                  falseData.Year = (ushort)2014;
                  falseData.Month = (ushort)9;
              }
  
              //Please, read here 
              falseData.Day = (ushort)1;
              //falseData.Hour = (ushort)10 - 1;
              //falseData.Minute = (ushort)30;
              //falseData.Second = (ushort)30;
              Win32SetSystemTime(ref falseData);
  
              string Y,M,D;
              Y = Convert.ToString(falseData.Year);
              M = Convert.ToString(falseData.Month);
              D = Convert.ToString(falseData.Day);
              textBoxDataImpostata.Text = D + "/" + M + "/" + Y;
          }
      }
  }
  </code></pre>