https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • w

    William Blankenship

    02/27/2023, 9:12 PM
    sadness, thanks for the quick response
  • d

    dave

    02/27/2023, 9:13 PM
    actually wait this is a bad idea for me, with heavy traffic I will never end up clearing my cache 😛
  • d

    Deleted User

    02/27/2023, 9:29 PM
    I had that issue so I also stored a
    lastModified
    timestamp in the response object which I could pull and evaluate dynamically how much time is really left https://svge.ms/L8Bn
  • d

    dave

    02/28/2023, 12:31 AM
    Copy code
    javascript
    new Date().toLocaleDateString("en-CA", {
        year: "numeric",
        month: "2-digit",
        day: "2-digit",
        timeZone: "UTC"
    })
    Sanity check, what does this return for you folks?
  • j

    James

    02/28/2023, 12:32 AM
    '02/28/2023'
  • d

    dave

    02/28/2023, 12:33 AM
    https://twitter.com/ravavyr/status/1628817114604662785
  • d

    dave

    02/28/2023, 12:33 AM
    wat
  • d

    dave

    02/28/2023, 12:33 AM
    why did it just change today
  • d

    dave

    02/28/2023, 12:33 AM
    at exactly 2023-02-28 00:00:28 +0000 UTC
  • d

    dave

    02/28/2023, 12:33 AM
    sus
  • j

    James

    02/28/2023, 12:34 AM
    https://github.com/nodejs/node/issues/45945#issuecomment-1377768233
  • j

    James

    02/28/2023, 12:34 AM
    interesting
  • d

    dave

    02/28/2023, 12:34 AM
    https://bugs.chromium.org/p/chromium/issues/detail?id=1415506
  • j

    James

    02/28/2023, 12:34 AM
    yeah I guess this is why you should just pull the bits you need directly via
    getYear
    , etc., and not rely on some specific country format to give you what you want 😅
  • j

    James

    02/28/2023, 12:35 AM
    that's a fun bug tho
  • d

    dave

    02/28/2023, 12:35 AM
    yeah it just broke my checkout process completely
  • d

    dave

    02/28/2023, 12:36 AM
    Copy code
    javascript
    const date_stringy = `${my_expiry_date.getUTCFullYear()}-${my_expiry_date.getUTCMonth() + 1}-${my_expiry_date.getUTCDate()}`
  • d

    dave

    02/28/2023, 12:36 AM
    I guess this is fine?
  • d

    dave

    02/28/2023, 12:38 AM
    as I got lucky enough that I just set up a health check to make sure this feature of mine is working lol
  • d

    dave

    02/28/2023, 12:39 AM
    I didn't think date formatting standards changed often...
  • j

    James

    02/28/2023, 12:41 AM
    yeah I didn't think so either. I guess I shouldn't be that surprised with how often timezones still change
  • d

    dave

    02/28/2023, 12:45 AM
    I got superrrr lucky with timing. I wonder how many other people this screwed over.
  • j

    James

    02/28/2023, 12:46 AM
    I definitely didn't check all our repos for
    toLocaleDateString
    and
    DateTimeFormat
    when you mentioned it
  • j

    James

    02/28/2023, 12:46 AM
    thankfully we're good, but yeah I bet this impacted quite a few folks
  • d

    dave

    02/28/2023, 12:52 AM
    so note to self, cloudflare worker runtimes update at 00:00 UTC time it seems
  • d

    dave

    02/28/2023, 12:52 AM
    that's kinda crappy for my timezone
  • d

    dave

    02/28/2023, 12:52 AM
    7pm :/
  • d

    dave

    02/28/2023, 2:52 AM
    does make me nervous that there’s no staggered rollout for CF Worker runtimes.
  • c

    Cyb3r-Jok3

    02/28/2023, 2:59 AM
    They usually announce if there is a run time change
  • d

    dave

    02/28/2023, 4:19 AM
    Yet here I was earlier. 😛
1...230623072308...2509Latest