Remix.run Logo
fauigerzigerk 3 days ago

>You are right that LocalDateTime requires location

No. If I set a reminder for a particular date and time in the future, I want it to go off at that local date and time wherever I may be.

The location cannot be part of the data type because "local" is sometimes relative to movable objects.

ivan_gammel 2 days ago | parent | next [-]

I don’t understand your objection. Local date and time is always bound to a local timezone, it‘s just implicit. Even in case of movable objects, the exact moment of time is defined by the watch aboard that object. You are on a ship and you wake up at 7am to get ready for breakfast? The exact moment of time when it happens is in the local time zone. The bar around the corner opens at 4pm? It’s in the local timezone, no matter how it changes. And „local“ means the timezone is defined by location, a ship, a city etc, so to calculate the exact moment of time you do location timezone lookup. Your phone does that automatically, picking up the timezone from cell tower and adjusting your local clock, so that alarm set at 7 (which is LocalTime) would work correctly.

1718627440 2 days ago | parent [-]

> Local date and time is always bound to a local timezone, it‘s just implicit.

It does not that's the key of this argument. Here local means "on this device", whatever dumb time this has.

ivan_gammel 2 days ago | parent [-]

Do you understand what „implicit“ means?

1718627440 2 days ago | parent [-]

Yes, but it's still not bound to a timezone, unless you define "all the timezones this device goes through" as a timezone.

bsaul 3 days ago | parent | prev [-]

good point, never thought of that.