0
可能重複:
How to convert UNIX timestamp to DateTime and vice versa?DateTime格式
我用這個代碼來獲得一個給定的UNIX時代
DateTime epoch=new DateTime(1970,1,1);
DateTime dt=new DateTime(1325506582751000+epoch.Ticks());
輸出結果的格式日期時間是1975/x/y
這是不正確的。
是否錯誤地定義了時期?我如何從任何給定的日期時間數據中獲得正確的一個?