|
|
|
новичок
      
участник
Last Login: 03.12.2002 14:07
Сообщ.: 8,
Visits: 89
|
|
Problema: kak brat v c# informaziyu o razlichnih vremennih zonah (Time Zones) i sootvetstvuyuchuyu im informaziyu o daylight saving time (DST). Ya ne imeyu vvidu property TimeZone.CurrentTimeZone, a mne nushna informaziya po vsem vremennim zonam i po ih DST-vremenam.
Zaranee spasibo, budu ochen blagodaren, tomu kto eto znaet.
|
|
|
|
|
новичок
      
участник
Last Login: 03.12.2002 6:34
Сообщ.: 4,
Visits: 45
|
|
using Microsoft.Win32; using System;
namespace TimeZoneRegistry {
public class TimeZone { static void Main() {
try {RegistryKey s = Registry.LocalMachine.OpenSubKey( "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones"); string[] y = s.GetSubKeyNames(); for (int i = 0; i < y.Length; i++){ Console.WriteLine ("{0}", y[i]); RegistryKey z = s.OpenSubKey(y[i]); string[] t = z.GetValueNames(); for (int j = 0; j < t.Length; j++){ Console.WriteLine ("{0}={1}", t[j], z.GetValue(t[j]).ToString()); } } }catch (Exception e) {Console.WriteLine(e.ToString());} } } }
|
|
|
|