puma / puma

A Ruby/Rack web server built for parallelism

Home Page:https://puma.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gem Specification Date is 1980-01-01 since version 5.6.0

copiousfreetime opened this issue · comments

Describe the bug

While testing out gem_dating I noticed that in my project, the date in the gemspec for puma version 6.3.0 was 1980-01-01

NAME | VERSION | DATE
-----|---------|-----------
puma | 6.3.0   | 1980-01-01

I would assume that the date in the gemspec itself, should be much closer to the date that shows up in rubygems when it is published.

To Reproduce

Looking at the remote of puma 6.3.0

% gem specification -r puma -v 6.3.0 --ruby | grep date
 s.date = "1980-01-01"
% bundle exec irb
>> spec = Gem.latest_spec_for('puma')
>> puts spec.date
1980-01-01 00:00:00 UTC
>> puts spec.version
6.3.0

And if we use the rubygems api we get that value is what is in the build_at

% curl -s https://rubygems.org/api/v2/rubygems/puma/versions/6.3.0 | jq '{built_at, created_at, version_created_at}'
{
  "built_at": "1980-01-01T00:00:00.000Z",
  "created_at": "2023-05-31T07:16:08.561Z",
  "version_created_at": "2023-05-31T07:16:08.561Z"
}

It looks like this started happening with version 5.6.0 as can be seen with:

% curl -s https://rubygems.org/api/v2/rubygems/puma/versions/5.5.2 | jq '{built_at, created_at, version_created_at}'
{
  "built_at": "2021-10-12T00:00:00.000Z",
  "created_at": "2021-10-12T23:08:22.969Z",
  "version_created_at": "2021-10-12T23:08:22.969Z"
}
% curl -s https://rubygems.org/api/v2/rubygems/puma/versions/5.6.0 | jq '{built_at, created_at, version_created_at}'
{
  "built_at": "1980-01-01T00:00:00.000Z",
  "created_at": "2022-01-25T21:21:49.705Z",
  "version_created_at": "2022-01-25T21:21:49.705Z"
}

This probably isn't a huge issue, but something to be aware of when folks are looking at dates / version via gem specifications.

Expected behavior

I would expect the build date of the puma gem to be much closer to the version_created_at date

Thoughts

I took a quick look through the diffs on 5.5.2 -> 5.6.0 and nothing immediately jumped out as part of the diff. All I can immediately think of is that the clock on the machines doing the actual gem build is incorrect. or there is a SOURCE_DATE_EPOCH environment variable on the build machine. According to the specification code the specification date is the date the gem was built and is set by the gem build command:

Duplicate of #3197

Dang it - my apologies for not finding that discussion @dentarg