[BUG] - Bogus build date and false copyright claims
Describe the bug The program's banner claims that it was built on Jan 19 2038. While that's merely silly, a potentially more serious problem is that it also claims to be Copyright 2014-2038. Making false copyright claims might get you in trouble.
To Reproduce Steps to reproduce the behavior:
- Invoke any program, for example
openSeaChest_Firmware -h - See error in the banner
Expected behavior Any build date, if provided, should be accurate. And any copyright date should reflect the date that the code was written, not the date that it was compiled.
Screenshots
==========================================================================================
openSeaChest_Firmware - openSeaChest drive utilities - NVMe Enabled
Copyright (c) 2014-2038 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
openSeaChest_Firmware Version: 4.0.0-6_2_0 X86_64
Build Date: Jan 19 2038
Today: Wed Oct 8 12:34:50 2025 User: current user
==========================================================================================
Desktop (please complete the following information):
- OS: FreeBSD amd64
- Version: 14.3-RELEASE
Version Info for openSeaChest_Firmware:
Utility Version: 4.0.0
opensea-common Version: 2.0.0
opensea-transport Version: 6.2.0
opensea-operations Version: 5.1.1
Build Date: Jan 19 2038
Compiled Architecture: X86_64
Detected Endianness: Little Endian
Compiler Used: Clang
Compiler Version: 19.1.7
Operating System Type: FreeBSD
Operating System Version: 14.3
Operating System Name: FreeBSD 14.3
@asomers,
Thank you for reporting this! It is very weird that it's outputting that date. We'll figure out what is causing that and fix it.
The cause of the build date was how the __DATE__ macro in C is expanded by the compiler.
Searching around it can happen in CI build VM's like we are using that default to some other date. I'm looking into if we can do an ntp sync before building and if that will resolve the issue.
That might work for any artifacts you publish . But I'm not using your artifacts. I'm using binaries that were built outside of your CI pipeline. And I just verified that in my build jail, date works correctly yet the bug still exists in the freshly built binary.
It sounds like the compiler is not reading the date correctly.
What happens if you run this?
echo 'const char *d = __DATE__;' | cc -E -
Or change cc to gcc/clang as needed.
I can look into a way to test this at build time and workaround it.
That works. It prints const char *d = "Oct 9 2025";
I am now super confused because that is the exact same macro used to set it in the source.
I'll see if I can recreate this on a machine I have. I have not seen this kind of issue happen before.
Adding some additional resources that we need to look into to assist with correcting this issue.
https://reproducible-builds.org/specs/source-date-epoch/ https://reproducible-builds.org/docs/source-date-epoch/