-3
這是我的代碼片段:DateTime.Parse更改日期?
public bool getEffDate()
{
testfunction(DateTime.Today.ToString("u"));
return true;
}
private bool testfunction(string modDate)
{
modDate = DateTime.Parse(modDate).ToString("yyyy-MM-dd");
return true;
}
DateTime.Today.ToString( 「U」) - 返回當前日期 然而,創建ModDate返回CURRENT_DATE - 1 ..
有人可以幫助我與UTC日期功能?爲什麼Parse函數會帶來前一天?
你在什麼時區? –