C#C
C#4y ago
3 replies
BBWatkins

Need help getting cest timezone

i currently have this code
var timer = new PeriodicTimer(TimeSpan.FromSeconds(1));

        while (await timer.WaitForNextTickAsync())
        {
                DateTime dateNow = DateTime.Now;
                label5.Text = "The date and time are {0} UTC."+
                                   TimeZoneInfo.ConvertTimeToUtc(dateNow);
                string time = DateTime.Now.ToString("hh:mm");
        }

but this gets the time in utc
i want to get the time cest who can help me out
Was this page helpful?