Use bfd_get_current_time in places where it is suitable

This commit is contained in:
Nick Clifton
2023-10-02 13:24:05 +01:00
parent 8f6f3f2965
commit 6a6117ab0f
4 changed files with 12 additions and 20 deletions

View File

@@ -1232,15 +1232,7 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
if (pe_data (abfd)->timestamp == -1)
{
time_t now;
char *source_date_epoch;
source_date_epoch = getenv ("SOURCE_DATE_EPOCH");
if (source_date_epoch)
now = (time_t) strtoll (source_date_epoch, NULL, 10);
else
now = time (NULL);
time_t now = bfd_get_current_time (0);
H_PUT_32 (abfd, now, edata_d + 4);
}
else