BizTalk 2010:日期时间问题
BizTalk Server 2010 具有以下系统配置
Server: Windows Server 2008
FrameWork: .Net 4.0
当 BizTalk 通过 HTTP 接收 DateTime 组合时,将进行如下转换。
DateTime Sent: **2010-06-01T00:00:00-04:00**
DateTime Received and logged: **2010-06-01T00:00:00-04:00** (BizTalk 2010)
在 BizTalk 2004(我们的旧集成环境,使用 .Net Framework 1.1)中,BizTalk 以以下格式接收和记录消息。
DateTime Sent: 2010-06-01T00:00:00-04:00
DateTime Received and Logged: 2010-06-01T00:00:00.0000000-04:00
可以看出,日期时间中添加了前导零。以下是一些对我来说仍然是个谜的组合。
Datetime Sent to BizTalk 2004: 2011-03-01T00:00:00-05:00
DateTime received and Logged: 2010-06-01T00:00:00.0000000-04:00
模式在两种环境中都定义为 xsd:dateTime。我无法找到解释为什么 BizTalk 或框架在这两种环境中表现不同。
注意:任何环境中都不会发生日期转换。
在 BizTalk 2010 中,我可以看到时区 (-4:00) 丢失。
想知道是否有任何设置需要修复此日期时间问题。
BizTalk Server 2010 has the following system configuration
Server: Windows Server 2008
FrameWork: .Net 4.0
Through HTTP when BizTalk receives the DateTime combination, it is being converted as follows.
DateTime Sent: **2010-06-01T00:00:00-04:00**
DateTime Received and logged: **2010-06-01T00:00:00-04:00** (BizTalk 2010)
In the BizTalk 2004 (our old integration environment, using .Net Framework 1.1), BizTalk is receiving and logging the message in the following formats.
DateTime Sent: 2010-06-01T00:00:00-04:00
DateTime Received and Logged: 2010-06-01T00:00:00.0000000-04:00
As it can be seen that leading zeros are being added to the DateTime. Following are some more combinations that are being a mystery to me.
Datetime Sent to BizTalk 2004: 2011-03-01T00:00:00-05:00
DateTime received and Logged: 2010-06-01T00:00:00.0000000-04:00
The schemas are defined in both the environments as xsd:dateTime. I'm unable to find an explanation to the fact that why BizTalk or the framework is behaving differently in both the environments.
Note: No Date Transformation occurs in any of the environment.
In BizTalk 2010, I can see that the TimeZone (-4:00) is missing.
Would like to know if there are any settings that we need to do fix for this DateTime issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您将需要更改服务器(或组中的服务器)上的时区。 BizTalk 主机实例使用计算机中的时区和区域设置。
不要从应用程序代码中以编程方式设置时区,因为进程和线程可以在多个实例之间共享,并且您将遇到非常讨厌的问题。
You will need to change the timezone on the server (or servers in the group). BizTalk Host Instances use the time zone and regional settings from the machine.
Don't set the time zone programmaticly from your application code, since processes and threads can be shared across multiple instances and you will run into very nasty problems.
检查注册表中服务器的时区设置是什么
您可以在 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation 中找到该注册表项。
但是,请确保在进行任何更改之前备份注册表。
Check what are the Timezone settings of the servers in the registry
You can find the key at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
However, pelase make sure you take a backup of your registry before making any changes.