J3RN :fedora: :elixir: :emacs: on Nostr: In JavaScript, when you invoke `new Date(...)` with a "plain date" string (no time, ...
In JavaScript, when you invoke `new Date(...)` with a "plain date" string (no time, no timezone), it assumes the timezone is UTC.
When you invoke `new Date(...)` with a "plain datetime" string (date and time, no timezone), it assumes the timezone is your local timezone.
TC39 Temporal can't come soon enough.
Published at
2024-08-04 22:52:24Event JSON
{
"id": "a7bcf87dbb80a75932b0a33645d65cb234257352b86317472dc508f9ba818759",
"pubkey": "eebd14d82c7521a8a88dc84281fb4f1441ac71d0241f4e0dfa3f5058a1a076b0",
"created_at": 1722811944,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/users/j3rn/statuses/112906203625395086",
"activitypub"
]
],
"content": "In JavaScript, when you invoke `new Date(...)` with a \"plain date\" string (no time, no timezone), it assumes the timezone is UTC.\n\nWhen you invoke `new Date(...)` with a \"plain datetime\" string (date and time, no timezone), it assumes the timezone is your local timezone.\n\nTC39 Temporal can't come soon enough.",
"sig": "cd28ebf9c22fd1d4816a10e6a7a26b7e400467fed163aa0603f949db0e5b701d987e8506bccec14fbe2606913e307a7bad5382c1dd245c1906659a002a67c118"
}