Skip to content

HammerTime stops applying DST for dates after 2038 #93

@nightpool

Description

@nightpool

Steps to reproduce:

  1. Navigate to https://hammertime.cyou/.
    a. If you're not in a locale that's currently experiencing DST, you'll need to first select a locale that experiences DST and type in a date that is subject to DST (for example: America/New_York and July 1st). Most people won't need this step, but it's included for completeness.
  2. Type in "2038" (or any subsequent year) for the year value.
  3. Notice that the timestamp is calculated incorrectly, and the displayed time is one hour off from the time that is typed in

screenshot of timestamp calculated incorrectly for 2038-06-01

For comparison, here's are two timestamps that are correctly calculated:

Year prior to 2038: Non-DST date:
screenshot of timestamp calculated correctly for 2037-06-01 screenshot of timestamp calculated correctly for 2038-03-01

Note that the problem here is in the calculation of the timestamp itself: the displayed times are correct, as far as I can tell, and match with how discord displays the calculated unix timestamps (e.g. <t:2158988400:f>), as well as how wolfram alpha displays them: https://www.wolframalpha.com/input?i=2158988400+seconds+after+unix+epoch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions