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.