From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Windows file timestamp converted to local time Date: Mon, 16 Oct 2023 20:14:36 +0100 Organization: A noiseless patient Spider Message-ID: References: <262bea8c-57ff-480e-b5aa-da94f0436e98n@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="3a79d3ca4da77f3d090f8710db067085"; logging-data="1714489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Hjooj9c08P1DkNzIlmYsrDXigC2t1Aw8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) Cancel-Lock: sha1:NXprGFFu8sQFo867geb40OBo2mw= sha1:ToyBQZmAz0UAE1udpXzYBh1fZ0w= Xref: news.eternal-september.org comp.lang.ada:65795 List-Id: Matt Borchers writes: > 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; For the first question, very likely to be in gcc/ada/adaint.c in the GCC sources (https://github.com/gcc-mirror/gcc) localtime() is in libc; depends on your OS.