Click here to Skip to main content
15,918,976 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I have got an assignmnet where users will be entering the location name and it should give the out put as the local time of that location.

For example: If server is in UK and I wanted to know the Bangalore time, So once I enter the bangalore timings it should give me the bangalore date.

Can any one help me how I can proceed on this?


Regards
Prashant
Posted

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

So start with Google, and look at DateTime and a CultureInfo - there is a ToString overload that you might find handy...
 
Share this answer
 
You will need to use the TimeZoneInfo[^] class and possible a way of mapping a location to a timezone - there are some suggestions on this post[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900