作者:叶子已经不是木头的了 | 来源:互联网 | 2023-09-14 08:17
IamportingaDelphiapplicationtoC#andIverunintoaproblem.TheDelphiapprecordsthetime
I am porting a Delphi application to C# and I've run into a problem. The Delphi app records the time into a log file, which then gets read back into the program. But the format of the time it records confuses me. I can find no .Net library to convert it properly.
我正在将一个Delphi应用程序移植到C#,我遇到了一个问题。 Delphi应用程序将时间记录到日志文件中,然后将其读回程序。但它记录的时间格式让我困惑。我找不到.Net库来正确转换它。
Delphi recorded time in log file: 976129709 (this gets converted to 1/14/2009 5:53:26 PM in the Delphi code)
Delphi在日志文件中记录时间:976129709(在Delphi代码中将其转换为1/14/2009 5:53:26 PM)
//Here is the Delphi code which records it:
IntToStr(DirInfo.Time);
//Here is the Delphi code which reads it back in:
DateTimeToStr(FileDateToDateTime(StrToInt(stringTime));
Anybody have any ideas how I can read this in .Net?
任何人都有任何想法,我怎么能在.Net中读到这个?
3 个解决方案