468,253 Members | 1,306 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,253 developers. It's quick & easy.

How to Find Current time in zone x from zone y

3
I have windows service which is going to run on several machines which are in different time zones in USA.
I want to find out the Eastern Zone current time from these different machines.

It should return me correct time based on timezone(GMT-4 for DST duration/GMT-5 for non DST duration)

Is there any simplest way to do this.

Logic which i used is as below:
1.Find Current local time
2.Find GMT time
3.Check Current date falls under DST or not based on own function which checks actual dates
4.Based on the value subtract -4 else subtract -5

This logic is not so correct because if DST duration change in future then it wont work correctly.
Sep 14 '06 #1
0 1600

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Jon Davis | last post: by
10 posts views Thread by Marc Pelletier | last post: by
1 post views Thread by Clodoaldo Pinto Neto | last post: by
4 posts views Thread by P. George | last post: by
3 posts views Thread by Satish Itty | last post: by
7 posts views Thread by Steve | last post: by
7 posts views Thread by Correia | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.