如何将时区设置为法国区 + windows ce

How to set time zone to frecnh zone + windows ce

我需要在我的移动设备中将我的时区设置为 c# 中的法语区(windows 嵌入式 ce)

请问我该怎么做?

不能设置时区city/location,只能设置夏令时数据

在这里查看我的 post:http://community.intermec.com/t5/Device-Management/change-Time-Zone-with-xml/m-p/17007/highlight/true#M1023

============================================= =============== 您不能使用注册表设置时区的名称!

您只能设置偏移量和夏令时值。然后时钟面板使用匹配的条目。

在注册表中,"GMT-7 (Mountain US)" 和 "GMT-7 (Arizona)" 的值几乎相同

[HKEY_LOCAL_MACHINE\Software\Microsoft\Clock] "AppInfo"=hex(3):01,00,00,00,80,01,00,00,0f,00,00,00,00,00,00,00,00,00,00,00 ,3a,01,00,00,69,00,00,00,00,00,00,00,01,00,00,00 "AppState"=十六进制(3):11 "AutoDST"=双字:00000000 "GMT_OFFSET"=双字:000001A4 "HomeDST"=双字:00000000 "NetworkTimeNotifyUser"=双字:00000001 "NetworkTimeSync"=双字:00000001 "TZIndex"=双字:00000004

(另见 http://peterfoot.net/HomeAndVisitingClocksInProfessionalEdition.aspx

[HKEY_LOCAL_MACHINE\Software\Microsoft\Clock] "AppInfo"=hex(3):01,00,00,00,80,01,00,00,0a,00,00,00,00,00,00,00,01,00,00,00 ,3a,01,00,00,69,00,00,00,00,00,00,00,01,00,00,00 "AppState"=十六进制(3):11 "AutoDST"=双字:00000000 "GMT_OFFSET"=双字:000001A4 "HomeDST"=双字:00000001 "NetworkTimeNotifyUser"=双字:00000001 "NetworkTimeSync"=双字:00000001 "TZIndex"=双字:00000004

但是,如您所见,没有时区名称字符串。

[HKEY_LOCAL_MACHINE\Time] "TimeZoneInformation"=hex(3):a4,01,00,00,55,00,53,00,20,00,4d,00,6f,00,75,00,6e,00,74,00 ,61,00,69,00,6e,00,20,00,53,00,74,00,61,00,6e,00,64,00,61,00,72,00,64,00,20 ,00,54,00,69,00,6d,00,65,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 ,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,55,00,53,00,20,00,4d ,00,6f,00,75,00,6e,00,74,00,61,00,69,00,6e,00,20,00,44,00,61,00,79,00,6c,00 ,69,00,67,00,68,00,74,00,20,00,54,00,69,00,6d,00,65,00,00,00,00,00,00,00,00 ,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,c4,ff ,ff,ff

[HKEY_LOCAL_MACHINE\Time] "TimeZoneInformation"=hex(3):a4,01,00,00,4d,00,6f,00,75,00,6e,00,74,00,61,00,69,00,6e,00 ,20,00,53,00,74,00,61,00,6e,00,64,00,61,00,72,00,64,00,20,00,54,00,69,00,6d ,00,65,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 ,0b,00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,00,00,4d,00,6f,00,75,00,6e ,00,74,00,61,00,69,00,6e,00,20,00,44,00,61,00,79,00,6c,00,69,00,67,00,68,00 ,74,00,20,00,54,00,69,00,6d,00,65,00,00,00,00,00,00,00,00,00,00,00,00,00,00 ,00,00,00,00,00,00,00,00,00,03,00,00,00,02,00,02,00,00,00,00,00,00,00,c4,ff ,ff,ff

这些是 TimeZoneInformations(TIME_ZONE_INFORMATION 结构)。

Clipboard02.gif

您可以查询附件中的时区城市数据库 (TZ-cities.txt)。

附加工具 (timezoneset.exe) 可用于更改当前活动时区的偏移量。

布拉格和柏林的时区信息相同:

指数:95 简称:GMT+1 Prague,Budapest 名称:中欧标准时间 GMT 偏移量:-60 夏令时名称:中欧夏令时 夏令时偏移量:0 ...

指数:110 简称:GMT+1 Berlin,Rome 名称:西欧标准时间 GMT 偏移量:-60 夏令时名称:西欧夏令时 夏令时偏移量:0

目的地名称除外。

使用注册表设置时区信息不是个好主意。

您可以使用这个库来简化您的开发:https://opennetcf.codeplex.com/

我正在使用它并通过以下对象设置时区:TimeZoneCollection、TimeZoneInformation、DateTimeHelper。