Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7855351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:21:22+00:00 2026-06-02T20:21:22+00:00

I am working on a small C# / ASP.NET project that will display 4

  • 0

I am working on a small C# / ASP.NET project that will display 4 or 5 different labels to show what time it is in different parts of the world.

I have been researching tons of different questions and blog posts about this across the net but I’m still missing a few pieces that a more experienced developer could fill in no problem. I have read up on things like “TimeZoneInfo” and “ToLocalTime” and “GetUTCOffSet” and the like.. and to someone as new as me it is getting confusing. I must say most of this info I have seen right here on Stack Overflow. I’d like to show what I have currently and see if I could get some advice here:

Code behind:

        protected void Timer1_Tick(object sender, EventArgs e)
    {
        string militaryTime = ( "HH:mm:ss tt" );
        lblTimer1.Text = DateTime.Now.ToString(militaryTime);
    }

Mark up on the .aspx page:

     <asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="1000">
                </asp:Timer>
                <h4 style="width: 200px">
                    Local :&nbsp;<asp:Label ID="lblTimer1" runat="server"></asp:Label>
                </h4>

Now, I understand that this is probably going to make more sense to do client side in Javascript, but this task is also a learning tool on how to make this happen in C# without the JS.

Anyway, I’m having trouble figuring out how to display different time zones for the following 4 labels I have. I want it to work off of DateTimeNow because this could be seen anywhere in the world in any time zone, and it should update the other 4 labels representing different world cities based on the users time zone in relation to those cities.

Again, I understand there are a lot of threads out there about this, and as you read this I am researching them, but so far I’m still missing some of the basic structure I need to build from.

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:21:25+00:00Added an answer on June 2, 2026 at 8:21 pm

    Try to use DateTimeOffset

    The DateTimeOffset structure includes a DateTime value, together with an Offset property that defines the difference between the current DateTimeOffset instance’s date and time and Coordinated Universal Time (UTC).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.net Web forms project that I am working on. I need
I have been working on a small project on recent delived ASP.NET MVC 3
I've got a relatively small project written in ASP.NET MVC3. After working a while,
I am working on an existing ASP.NET MVC app that started small and has
I have an small ASP.NET application that reads data from a table and sends
I'am working on small ASP.NET MVC project and I got an weird behaviour. At
I have a small working application in ASP.NET and C#, and I would like
I'm working on a small library for for ASP.NET MVC 3 that should offer
I'm working on a small ASP.NET project and just hit a wall. In a
Im working on a small application to try out an idea that I have.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.