From 47735c3d73cc677e519cd33b58232c97729596fa Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 9 Jun 2008 23:52:56 +0200 Subject: Date/time string formatting revision Added ability to set custom date/time format --- UEngines.pas | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'UEngines.pas') diff --git a/UEngines.pas b/UEngines.pas index 89fb4dd..219a621 100644 --- a/UEngines.pas +++ b/UEngines.pas @@ -21,7 +21,7 @@ unit UEngines; interface -uses glib2, gdk2, Classes, Libc; +uses glib2, gdk2, Classes, Libc, UGlibC_compat; const ERRException = -1; @@ -49,7 +49,7 @@ type UpDir: boolean; Mode, UID, GID: Cardinal; IsDir, IsLnk, IsBlk, IsChr, IsFIFO, IsSock, Selected, IsDotFile: boolean; - ModifyTime: TDateTime; + ModifyTime: TTimeT; Icon: Pointer; ItemColor: PGdkColor; end; @@ -64,7 +64,7 @@ type Size: Int64; Mode, UID, GID: Cardinal; IsDir, IsLnk, ForceMove, IsOnRO, IsExecutable: boolean; - ModifyTime: TDateTime; + ModifyTime: TTimeT; Level: word; atime, mtime: Int64; end; @@ -189,7 +189,7 @@ procedure FreeDataItem(DataItem: PDataItem); overload; implementation -uses SysUtils, UCoreUtils, UConfig, UGlibC_compat; +uses SysUtils, UCoreUtils, UConfig; (********************************************************************************************************************************) constructor TPanelEngine.Create; @@ -309,9 +309,9 @@ begin IsFIFO := __S_ISTYPE(StatBuf^.st_mode, __S_IFIFO); IsSock := __S_ISTYPE(StatBuf^.st_mode, __S_IFSOCK); {$IFDEF KYLIX} - ModifyTime := UnixTimeToTDateTime(StatBuf^.st_mtime); + ModifyTime := StatBuf^.st_mtime; {$ELSE} - ModifyTime := UnixTimeToTDateTime(StatBuf^.st_mtim.tv_sec); + ModifyTime := StatBuf^.st_mtim.tv_sec; {$ENDIF} if StatBuf^.st_uid = 4294967295 then UID := getuid else UID := StatBuf^.st_uid; @@ -591,9 +591,9 @@ var Handle : PDirectoryStream; end; end; {$IFDEF KYLIX} - ModifyTime := UnixTimeToTDateTime(StatBuf_local^.st_mtime); + ModifyTime := StatBuf_local^.st_mtime; {$ELSE} - ModifyTime := UnixTimeToTDateTime(StatBuf_local^.st_mtim.tv_sec); + ModifyTime := StatBuf_local^.st_mtim.tv_sec; {$ENDIF} // DebugMsg([FormatDateTime('c', ModifyTime)]); Level := ALevel + Ord(not AddCurrDirStage); @@ -675,9 +675,9 @@ begin ForceMove := False; // DebugMsg(['x2']); {$IFDEF KYLIX} - ModifyTime := UnixTimeToTDateTime(StatBuf^.st_mtime); + ModifyTime := StatBuf^.st_mtime; {$ELSE} - ModifyTime := UnixTimeToTDateTime(StatBuf^.st_mtim.tv_sec); + ModifyTime := StatBuf^.st_mtim.tv_sec; {$ENDIF} // DebugMsg(['x2']); if StatBuf^.st_uid = 4294967295 then UID := getuid -- cgit v1.2.3