屏蔽配置文件中编码格式对日期时间的影响
无论你的Web.Config中设置的编码格式是什么,都不会影响Format化日期时间
<!--
<globalization culture="zh-CN" uiCulture="zh-CN" requestEncoding="gb2312" responseEncoding="gb2312" />
<globalization requestEncoding="big5" responseEncoding="big5" />
-->
<globalization culture="en-US" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" />
<globalization culture="zh-CN" uiCulture="zh-CN" requestEncoding="gb2312" responseEncoding="gb2312" />
<globalization requestEncoding="big5" responseEncoding="big5" />
-->
<globalization culture="en-US" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" />
myStringBuilder.AppendFormat(@"<input type=""hidden"" name=""fly_time"" id=""fly_time"" value=""{0}"">", orderinfo.FlightItineraryInfo.FlightLegSet[0].PrimaryFlightSegment.DepartureTime.ToString("HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo));
哈哈!多好呀!