Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

World Clock

Posted on 2010-11-12
5
Medium Priority
?
1,470 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
[X]
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
  • 3
5 Comments
 
LVL 84

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

715 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