Below is the function from System.OS_Lib.
Does anybody know where the C implementation can be found?
Does anybody know where the C implementation of "localtime" is found?
function File_Time_Stamp (Name : C_File_Name) return OS_Time is
function File_Time (Name : Address) return OS_Time;
pragma Import (C, File_Time, "__gnat_file_time_name");
begin
return File_Time (Name);
end File_Time_Stamp;
Below is the function from System.OS_Lib.
Does anybody know where the C implementation can be found?
Does anybody know where the C implementation of "localtime" is found?
function File_Time_Stamp (Name : C_File_Name) return OS_Time is
function File_Time (Name : Address) return OS_Time;
pragma Import (C, File_Time, "__gnat_file_time_name");
begin
return File_Time (Name);
end File_Time_Stamp;
On 2023-10-16 21:35, Matt Borchers wrote:
Below is the function from System.OS_Lib.
Does anybody know where the C implementation can be found?
Does anybody know where the C implementation of "localtime" is found?
function File_Time_Stamp (Name : C_File_Name) return OS_Time is(This question seems to be a follow-up ("Re:") to some earlier post, but
function File_Time (Name : Address) return OS_Time;
pragma Import (C, File_Time, "__gnat_file_time_name");
begin
return File_Time (Name);
end File_Time_Stamp;
my newsreader does not seem to find or show that earlier post.)
What is the problem?
Have you tried using the standard Ada services: Ada.Directories.Modification_Time and Ada.Calendar.Time_Zones.Local_Time_Offset?
On 2023-10-16 21:35, Matt Borchers wrote:
Below is the function from System.OS_Lib.
Does anybody know where the C implementation can be found?
Does anybody know where the C implementation of "localtime" is found?
function File_Time_Stamp (Name : C_File_Name) return OS_Time is
function File_Time (Name : Address) return OS_Time;
pragma Import (C, File_Time, "__gnat_file_time_name");
begin
return File_Time (Name);
end File_Time_Stamp;
(This question seems to be a follow-up ("Re:") to some earlier post, but
my newsreader does not seem to find or show that earlier post.)
What is the problem?
Have you tried using the standard Ada services: Ada.Directories.Modification_Time and Ada.Calendar.Time_Zones.Local_Time_Offset?
Below is the function from System.OS_Lib.
Does anybody know where the C implementation can be found?
Does anybody know where the C implementation of "localtime" is found?
function File_Time_Stamp (Name : C_File_Name) return OS_Time is
function File_Time (Name : Address) return OS_Time;
pragma Import (C, File_Time, "__gnat_file_time_name");
begin
return File_Time (Name);
end File_Time_Stamp;
On 2023-10-16 21:35, Matt Borchers wrote:
Below is the function from System.OS_Lib.
Does anybody know where the C implementation can be found?
Does anybody know where the C implementation of "localtime" is found?
function File_Time_Stamp (Name : C_File_Name) return OS_Time is(This question seems to be a follow-up ("Re:") to some earlier post, but
function File_Time (Name : Address) return OS_Time;
pragma Import (C, File_Time, "__gnat_file_time_name");
begin
return File_Time (Name);
end File_Time_Stamp;
my newsreader does not seem to find or show that earlier post.)
What is the problem?
Have you tried using the standard Ada services: Ada.Directories.Modification_Time and Ada.Calendar.Time_Zones.Local_Time_Offset?
Ada.Directories.Modification_Time returns a value of type
Ada.Calendar.Time. However, "the time base associated with the type
Time of package Calendar is implementation defined" (RM 9.6(23)) so it
should be documented in the implementation documents, that is in the
GNAT documentation. Have you looked there?
On Monday, October 16, 2023 at 2:49:52 PM UTC-4, Niklas Holsti wrote:
On 2023-10-16 21:35, Matt Borchers wrote:
Below is the function from System.OS_Lib.(This question seems to be a follow-up ("Re:") to some earlier post, but
Does anybody know where the C implementation can be found?
Does anybody know where the C implementation of "localtime" is found?
function File_Time_Stamp (Name : C_File_Name) return OS_Time is
function File_Time (Name : Address) return OS_Time;
pragma Import (C, File_Time, "__gnat_file_time_name");
begin
return File_Time (Name);
end File_Time_Stamp;
my newsreader does not seem to find or show that earlier post.)
What is the problem?
Have you tried using the standard Ada services:
Ada.Directories.Modification_Time and
Ada.Calendar.Time_Zones.Local_Time_Offset?
Thank you for the suggestion of using "Ada.Directories.Modification_Time".
I didn't think to look in that package.
This function adjusts for daylight savings time and returns the time
as displayed in Windows Explorer.
There needs to be better comments (and documentation) for these time
related functions. It is often not clear what time is returned.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 44:35:44 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,858,054 |