melpa / package-build

Tools for assembling a package archive
https://github.com/melpa/melpa
25 stars 34 forks source link

Always use UTC timezone for HEAD version #30

Closed 10sr closed 5 years ago

10sr commented 5 years ago

I sometimes use this package on my machine. I personally use JST. When I built a package, I noticed the package version of HEAD package was very different from one of MELPA.

I think it would be good to pin the timezone for version string to GMT, to make versions be more consistent across multiple machines.

Actually, I don't fully understand the impact of this PR. (What is the timezone of the MELPA build server? If it is already GMT, I think it will not be a big problem.) If this PR is not acceptable for some reasons, please close.

purcell commented 5 years ago

Thanks! I'm pretty sure that (for unfortunate historical reasons) the MELPA server is in a different timezone, so changing this default could potentially cause all packages to be rebuilt. It's probably a good idea to use UTC (which is the preferred name for GMT), but I don't want to merge this without input from @milkypostman and @tarsius, in case they can think of anything that might go wrong. I feel like we've discussed this previously though...

(I also haven't reviewed/tested this patch locally to confirm it works for various timezones.)

tarsius commented 5 years ago

I am strongly in favor of this change. I cannot remember having discussed this before.

I cannot think of anything that could go wrong, except that some snapshot dates obviously will be replaced by "older" ones and then stay that way because no new commits are being pushed. That shouldn't be a problem though but could be a little confusing.

purcell commented 5 years ago

except that some snapshot dates obviously will be replaced by "older" ones

I think the timestamps would get replaced with newer ones, no? A 201907210000 timestamp in UTC-5 would become 201907210500 in UTC.

So that makes it safe, but will cause every package to appear newer for all users.

Still probably a good idea to bite the bullet and do it.

tarsius commented 5 years ago

I think the timestamps would get replaced with newer ones, no?

Ähh, both? There are UTC-n and UTC+n places on this sphere.

E.g. 2019-07-21T12:05:00-02:00 would become 2019-07-21T10:05:00Z.

milkypostman commented 5 years ago

Yeah we can do this. It would just cause all packages to need an upgrade for everyone one time. The timestamps are all base on the server time zone right now.

Go for it.

On Sun, Jul 21, 2019 at 05:06 Jonas Bernoulli notifications@github.com wrote:

I think the timestamps would get replaced with newer ones, no?

Ähh, both? There are UTC-n and UTC+n places on this sphere.

E.g. 2019-07-21T12:05:00-02:00 would become 2019-07-21T10:05:00Z.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/melpa/package-build/pull/30?email_source=notifications&email_token=AAAJJMTYGS6S4KMC7GKTDU3QAQYIVA5CNFSM4H5CZKOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2OADFQ#issuecomment-513540502, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAJJMXGGEKH2A4JREUJCB3QAQYIVANCNFSM4H5CZKOA .