修改 IIS6.0 时间格式的问题。
程序发布到iis上之后,用 DateTime.Now.ToString() 取时间 时间的格式和 系统的时间格式不一样,这个应该是iis自己有一个时间的格式,需要重新设置一下iis的时间格式:
打开注册表 HKEY_USERS===》.DEFAULT===》Control Panel====》International "iCountry"="86" "iCurrDigits"="2" "iCurrency"="0" "iDate"="2" "iDigits"="2" "iLZero"="0" "iMeasure"="0" "iNegCurr"="2" "iTime"="1" "iTLZero"="0" "Locale"="00000804" "s1159"="上午" "s2359"="下午" "sCountry"="中华人民共和国" "sCurrency"="¥" "sDate"="-" "sDecimal"="." "sLanguage"="CHS" "sList"="," "sLongDate"="yyyy'年'M'月'd'日'" "sShortDate"="yyyy-M-d" ====更改这里====== 如果用 datatime。now 取的时间。 "sThousand"="," "sTime"=":" "sLongDate16"="dddd', 'MMMM' 'dd', 'yyyy" "iTimePrefix"="1" "iCentury"="0" "iDayLZero"="1" "iMonLZero"="1" "iChinaYear"="0" "iCalendar"="1" "sTimeFormat"="H:mm:ss" "DefaultBlindDialFlag"=hex:00 "sMonDecimalSep"="." "sMonThousandSep"="," "iNegNumber"="1" "sNativeDigits"="0123456789" "NumShape"="1" "iCalendarType"="1" "iFirstDayOfWeek"="6" "iFirstWeekOfYear"="0" "sGrouping"="3;0" "sMonGrouping"="3;0" "sPositiveSign"="" "sNegativeSign"="-"