두 개의 웹 서버 WEB1과 WEB2가 있습니다. 함수 :ASP.net은 다른 서버에서 다르게 렌더링합니다.
public static string ToTimeAgoHTML(this DateTime date)
{
return "<time class=\"timeago\" datetime=\"" + date.ToString("o") + "\">" + date.FriendlyDate() + "</time>";
}
값이 호출됩니다. 이들은 같은 렌더링 :
WEB1 Web2입니다이 작업을 수행하지 않는 반면 WEB1가, 마지막에 z
로 렌더링하는
<time class="timeago" datetime="2017-04-03T15:12:04.9072263Z">3 Apr, 2017</time>
Web2입니다
<time class="timeago" datetime="2017-04-03T15:12:04.9072263">3 Apr, 2017</time>
참고. 이로 인해 Web2에 대한 요청이 과거 1 시간 동안 표시되었습니다.
두 웹 서버 시간대는 Windows에서 (UTC) Coordinated Universal Time
으로 설정됩니다.
여기에 무슨 일이 일어날 지 아는 사람이 있습니까?
문화 란 무엇입니까? – mason
@Mason 두 웹 서버 모두 IIS의 'Invariant Language (Invariant Country)'에서 동일합니다 –
실제 스레드에서 확인합니다. 'Thread.CurrentThread.CurrentCulture'와'Thread.CurrentThread.CurrentUICulture'를 확인하십시오. – mason