After the program is published to IIS, datetime is used. now. the format of tostring () time is different from the system time format. This is because IIS has its own time format. You need to reset the time format of IIS:
Open the Registry 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" = "Morning" s2359 "=" Afternoon "" scountry "=" People's Republic of China "" scurrency "=" ¥ "sdate" "="-"" sdecimal "= ". "" slanguage "=" CHS "" slist "= ", "" slongdate "=" YYYY ', 'M', 'D' "" s0000date "=" yyyy-m-d "==== change here ==== = If Datatime. Now. "Sthousand" = "," "stime" = ":" "slongdate16" = "ddddd', '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 "= "-"