News for hackers. Stuff that matters.
Re:JavaScript dates are about to be fixed by mminer237 on Saturday August 24, 2024 @02:28PM (#41340281)
That is how I would expect a bank statement to read though. I would find it infinitely more confusing if I bought something online in my bank showed the time of wherever the seller was located.

The photos problem is harder, but the app needs to just convert it from local time to UTC when you import it. There's not much that can be done if you take photos on a camera with a different time zone than you're in without more metadata.

Re:JavaScript dates are about to be fixed by lxgr on Saturday August 24, 2024 @03:15PM (#41340671)
You'll find that most bank systems avoid any notion of time precision higher than calendar days for a variety of reasons :) As a side effect, this practice conveniently avoids that problem entirely.

> That is how I would expect a bank statement to read though. I would find it infinitely more confusing if I bought something online in my bank showed the time of wherever the seller was located.

When using my banking app abroad (one that does show timestamps), I'm usually much more confused by their presence than by their absence.

> The photos problem is harder, but the app needs to just convert it from local time to UTC when you import it.

But I usually want to see the time in local hours and minutes for photos! Sunsets, new year's fireworks etc. happen according to local time, not UTC or my current timezone's offset.

Re:JavaScript dates are about to be fixed by mminer237 on Sunday August 25, 2024 @08:23AM (#41346807)
Yeah, storage needs to be implemented in UTC and display needs to be in local time.
Re:JavaScript dates are about to be fixed by lxgr on Sunday August 25, 2024 @03:25PM (#41350437)
But which local time?

Sometimes, the local time at the place the photo was taken can make more sense, but it's not a general rule.

Re:JavaScript dates are about to be fixed by netsharc on Saturday August 24, 2024 @02:34PM (#41340340)
Yeah, these are workarounds we have to use because many pieces of software weren't implemented fully...