0
привет всем мне нужно сделать часовой пояс для моего окна CE 6 изменено на «(GMT +03: 00) Кувейт, Эр-Рияд» и это мой кодКак установить определенный часовой пояс для Windows CE By C#
[DllImport("coredll.dll", CharSet = CharSet.Auto)]
private static extern int GetTimeZoneInformation(out TimeZoneInformation lpTimeZoneInformation);
[DllImport("coredll.dll", CharSet = CharSet.Auto)]
private static extern bool SetTimeZoneInformation(ref TimeZoneInformation lpTimeZoneInformation);
[StructLayout(LayoutKind.Sequential)]
public struct SYSTEMTIME
{
public int wYear;
public int wMonth;
public int wDayOfWeek;
public int wDay;
public int wHour;
public int wMinute;
public int wSecond;
public int wMilliseconds;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TimeZoneInformation
{
public int bias;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string standardName;
public SYSTEMTIME standardDate;
public int standardBias;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string daylightName;
public SYSTEMTIME daylightDate;
public int daylightBias;
}
Как я могу использовать этот код для установки часового пояса для конкретного , пожалуйста, любой может мне помочь.
Смотрите также http://stackoverflow.com/questions/34016733/c-sharp-windows-ce-compact-framework-2-0-set-system-timezone/34035101#34035101 – josef