c# - World Time Widget - Display the time in a city -


i need implement world time widget allow user select city, hit button , display time in city them.

has got pointers me please?

take @ timezoneinfo class (msdn link). class, introduced in .net 3.5 handles of heavy lifting you.

the steps you're asking follows:

  1. in dropdown list of cities, set value each city timezoneinfo displayname. see here how use timezoneinfo.getsystemtimezones method. take bit of work but, thanksfully, you'll have once.
  2. when user selects city, use timezoneinfo.converttime method convert time , you're done.

there several different methods in timezoneinfo class , closer inspection solution.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -