Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

World Clock

Posted on 2010-11-12
5
1,445 Views
Last Modified: 2012-06-27
I need to display times for 6 locations around the world on a local server, including the current time where the web server sits.
I also need to adjust for DST.

Is there a straight-forward way of doing this?
0
Comment
Question by:devo00
  • 3
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34125230
Here's a link to info about 'tzdata', a public domain time info database: http://en.wikipedia.org/wiki/Tz_database   I don't find a link to C# code right off but there probably is sample code somewhere.  tzdata is frequently updated.
0
 
LVL 10

Expert Comment

by:Mez4343
ID: 34125233
I would try to use an existing web service that provides that functionality. There is a free one with sample code here. http://www.csharphelp.com/2006/10/consuming-a-web-service-in-c/

If you only need 6 locations and not the whole world, then maybe this is project will get you started. http://www.codeproject.com/KB/selection/3ZoneWorldClock.aspx
0
 

Author Comment

by:devo00
ID: 34145479
Even with improvements in ASP.NET 3.5, it's this involved?
0
 

Accepted Solution

by:
devo00 earned 0 total points
ID: 34146766
This 'seems' to be the answer I'm looking for, does not require the larger efforts noted above, and accommodates DST:

Using the .NET 3.5 TimeZoneInfo object:

DateTime oldTime = new DateTime(2007, 6, 23, 10, 0, 0);
TimeZoneInfo timeZone1 = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time");
TimeZoneInfo timeZone2 = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
DateTime newTime = TimeZoneInfo.ConvertTime(oldTime, timeZone1, timeZone2);

Open in new window


Chris Pietschmann
0
 

Author Closing Comment

by:devo00
ID: 34182413
Found a good, succinct, working solution in my own search efforts.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Question about JQuery and asp.net 3 30
C# Gridview 1 47
defining NULL or 0 10 44
Using data from certificate to re-create certificate programmatically 3 26
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question