Tag Archives: UTC

Display the local time and GMT in C#

This example uses a Timer to execute the following code every half second. // Update the clocks. private void tmrClock_Tick(object sender, EventArgs e) { // Display the local time. DateTime now = DateTime.Now; lblLocalTime.Text = now.ToLongTimeString(); lblLocalDate.Text = now.ToShortDateString(); // … Continue reading

Posted in internationalization, system | Tagged , , , , , , , , , , , , , , | 1 Comment