There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

lord_ryvan ,

Timezones are fine to program around.
DST is a bit of a pickle to plan around, but can be done just fine by a computer program.

Historical dates; considering leap years, skipped leap years, and times when leap years weren’t a thing or when humanity just decided we skip a bunch of years; are the bane of all that is good.

JackbyDev ,

Proleptic Gregorian Calendar enjoyers

yistdaj ,

I hear timezone names can also be a slight issue at times, some Australians call the eastern time zone EST. Leap years aren’t so bad at times either though. Kind of agree with the rest of it, much of the complexity is from historical dates.

Couldbealeotard ,
@Couldbealeotard@lemmy.world avatar

We call eastern coast time AEST

yistdaj ,

I know most call it AEST, but there are some who call it EST.

veganpizza69 ,
@veganpizza69@lemmy.world avatar

I fucking hate timezones. Whatever it is, I’d rather read the current clock as 4 a.m. even if it’s noon than have timezones.

gencha ,

Only freaks have AM/PM in their time system.

KinglyWeevil ,

24hr clock supremacy

letsgo ,

Well you can. Just switch your clock to UTC and you’re done. You won’t even have DST to deal with.

veganpizza69 , (edited )
@veganpizza69@lemmy.world avatar
numberfour002 ,

I would truthfully and happily go back in time and tell people not to waste with the fucked up bullshit technology of the past. I mean Angular 1, what the hell was that? Twitter integration? Fuck you 2010. Zend Framework? You should be hanged. HANGED.

uis ,

Worst is UTC vs IAT

KillingTimeItself ,

fr i keep saying this and nobody seems to think it’s a good idea.

Fuck timezones, me and my homies operate on UTC.

Sunrosa ,

Ive been using utc personally for over a year and i use it in context of vrchat since it yields one less necessary conversion to other people’s timezones because only the offset is needed (as opposed to memorizing both offsets, which is much harder because of that nasty nasty daylight savings and its weird anomalies) but they still hate it and tell me to use a “normal” timezone lol. I had gotten 1 person to switch. And she since switched back. Shit don’t work in practicality but I’m still gonna use it out of stubbornness

KillingTimeItself ,

if i can’t have anything nice, you can’t have anything nice, and only the people who can’t have anything nice will have something nice >:)

JackbyDev ,

Go play EVE Online. The servers used to have (still, do I think, but shorter) daily downtime that was scheduled using UTC and it led to everyone using UTC since the game server itself used that time.

JayDee ,

There’s dozens of us! Yeah practically it’s almost entirely an aesthetic effect. I’ve kept it that way and haven’t had any problems from it, though.

Hasherm0n ,

One of my favorite T-shirts. www.teepublic.com/t-shirt/23763923-utc-or-gtfo

(I am not affiliated in any way with this shop)

uis ,

UTC is timezone too. It has leap seconds. IAT is atomic time. It is perfect.

kakes ,

I say we ditch this nonsense altogether and go back to vague descriptions of the Sun’s position in the sky.

uis ,

Isn’t that UT0?

Couldbealeotard ,
@Couldbealeotard@lemmy.world avatar

“many moons ago, when the sun was low in the sky…”

letsgo ,

No it doesn’t. “Time zones around the world are expressed using positive or negative offsets from UTC, as in the list of time zones by UTC offset.”

en.wikipedia.org/wiki/Coordinated_Universal_Time

Time now in UTC is 10:33, no matter where on the planet you are.

uis ,

UTC is expressed using positive or negative offset from IAT

AndrasKrigare ,

That doesn’t mean it’s a timezone

AndrasKrigare ,

The title partially answers this.

www.timeanddate.com/time/gmt-utc-time.html

GMT is a time zone officially used in some European and African countries. The time can be displayed using both the 24-hour format (0 - 24) or the 12-hour format (1 - 12 am/pm).

UTC is not a time zone, but a time standard that is the basis for civil time and time zones worldwide. This means that no country or territory officially uses UTC as a local time.

KillingTimeItself ,

I’d fuck with atomic time, but at that point i want a perfect calendar system also.

JayDee ,

UTC has leap seconds to keep it aligned with earth’s rotation. Otherwise all timezones would slowly shift away from having any correlation with solar time. Between UTC and IAT, UTC is the more human-useable and thus better.

uis ,

The post is about developers.

cyborganism ,

Holy shit! Yes!!! Having worked with time sensitive data, it’s such bullshit.

Zagorath ,
@Zagorath@aussie.zone avatar

Dates and times aren’t that hard—honestly!

Video is a lecture about how to think about dates and times, through the lens of a specific open source .NET library designed to aid with applying that thinking. It points out how most languages’ standard libraries really work against you, because they conflate different concepts. For example, an Instant (a specific point in time, globally recognised) and a LocalDateTime (a date and time in a way that is irrespective of your location—for example you might want your alarm to wake you at 8:00 am on weekdays, and still do that if you move to a different time zone), a ZonedDateTime (a date and time tied to a specific location—like if you want to say “the meeting starts at 10:00 am Oslo Time”), and an OffsetDateTime (a date and time tied to a specific UTC offset—which is not necessarily the same as a time zone, because “Oslo Time” is a time zone that doesn’t change, but its UTC offset might change if they go in or out of DST, or if a place decides to change, like how Samoa changed from UTC-11 to UTC+13 in 2011.

These are all subtly different concepts which are useful in different cases, but most libraries force you to use a single poorly-defined “DateTime” class. It’s easier and requires less thought, but is also much more likely to get you into trouble as a result, precisely because of that lack of thought, because it doesn’t let you make a clear distinction about what specifically it is.

His library is great for this, but it’s very worth thinking about what he’s talking about even if you don’t or can’t use it. As he says in wrapping up:

You may be stuck using poor frameworks, but you don’t have to be stuck using poor concepts. You can think of the bigger concepts and represent all the bits without having to write your own framework, without having to do all kinds of stuff, just be really, really clear in all your comments and documentation.

lugal ,

Aren’t time zones quite straightforward? You add a whole number of hours and for some a half. Compare that to a sundial on the one side and having times that don’t match your day at all on the other, I’d say it’s good

orbitz ,

Not if the place doesn’t do daylight savings time, and not all places in a timezone will do that (least in North America) so you need extra code if they do or do not. It becomes a pain after awhile when you do it in multiple projects. Technically one extra setting but it’s still a pain to make sure it’s handle properly in all cases, especially when the previous programmer decided to handle it for each case individually, but that’s a different issue.

Also when you deal with the times, say in .Net you gotta make sure it’s the proper kind of date otherwise it decides it’s a local system date and will change it to system local when run. Sure it’s all handled but there are many easy mistakes to make when working with time.

I probably didn’t even get to the real reason, I sort of picked this up on my own.

lugal ,

Sounds like daylight saving is the bigger issue. Maybe not bigger but when you compare cost and benefit. I think the US uses even different start and end dates than the EU and I don’t know about the rest of the world

el_abuelo ,

Yeah the US differs by a couple of weeks iirc

Zagorath ,
@Zagorath@aussie.zone avatar

You add a whole number of hours and for some a half

Or three quarters in a few cases.

And of course there are cases where countries spanning as many as 5 “ideal” time zones (dividing the globe into 24 equal slices) actually use a single time zone.

And then when someone tells you the meeting is at 10:00 am, you have to figure out if they mean your time zone or theirs, and if they mean theirs, you then have to convert that to yours. Oh, but your conversion was wrong because one of you went into or out of daylight saving time between the day when you did the conversion and when the meeting took place.

lugal ,

But what is the alternative? Sure, fck daylight saving. Having the date changed at noon is fucked up, too, and that’s what happens if you agree to one global time. And having countries that are too big for a time zone is fucked up as well. Russia for example actually only spans to the Ural mountains, everything to the east are colonies. Fuck states in general

Zagorath ,
@Zagorath@aussie.zone avatar

I personally would prefer if we all used UTC. My working hours would be 23:00 to 07:00. A Brits working hours would be 09:00 to 17:00, and a New Yorker would work 13:00 to 21:00.

But this does have its own drawbacks. Personally I just think those drawbacks, in the sorts of real-world time-related conversations I’ve had, are less than the drawbacks of dealing with varying time zones.

But yeah, the biggest factor is daylight saving time. Doing away with it is the number one option places that use it should take, regardless of whether one advocates for abolishing time zones or not.

CanadaPlus ,

Normie. Real timezone-haters use Unix epoch. /s

KillingTimeItself ,

im a proponent of using exclusively UTC for anything pertinent to being accurate, and then using local solar time (the sun) to refer to everything else, it has the benefit of making people look outside anyway.

MisterFrog ,
@MisterFrog@lemmy.world avatar

The drawbacks are many and the benefits are few.

Watching foreign films would be a pain, where is this in the world again, what does 19:00 mean for them? More exposition, or you just have to guess based on languag and accent.

I need this work done by our team in XYZ country, what are their working hours? (wow, look at that, still using timezones?)

When you arrive somewhere on holiday, now you have to get a sense of the time there. Or continually be thinking “what’s that in my home time?/what’s that in solar time”, which is why solar time just makes more sense.

People aren’t going to stop thinking in solar time, ever. We’re hard-wired to be awake with the sun. It doesn’t matter what the numbers are, you will associate them with the sun. The question then becomes, would we rather all use roughly the same numbers (timezones, what we currently have), or different numbers (everyone using UTC).

Using UTC solves only 1 problem, you can say verbally to someone across the world, let’s make the meeting 15:00 - but this is already easily solved by using a calendar which converts for you…

There’s a reason we have never used a single non-solar time, it’s just worse and I think there’s a reason these posts always end up on programmer focused places on the internet. Yes, I’m sure their job is annoying, and it would be easier to not have to solve time conversion problems, but the time conversion problems wouldn’t even go away if you forced everyone to use UTC. You’d just start having to do conversions to solar time, or looking up waking hours (which is just timezones)

This is a solved problem.

flerp ,

I think there’s a reason these posts always end up on programmer focused places on the internet. Yes, I’m sure their job is annoying, and it would be easier to not have to solve time conversion problems, but the time conversion problems wouldn’t even go away if you forced everyone to use UTC. You’d just start having to do conversions to solar time, or looking up waking hours (which is just timezones)

Which is short sighted considering it is much easier to make a standardized library for converting time zones than it is to make a standard library reflecting what different time numbers mean in different places around the world. If they somehow convinced people to make the change, they would find out pretty quickly they were better off with the devil they knew.

lord_ryvan , (edited )

I agree planning around it is stupid, but I don’t see how that affects computer programs.

(let me clarify, this seems like an everyone-issue, rather than a developer-issue)

homoludens ,

IMO the problem for developers is that they have to provide general solutions, so they have to cover each case all the time instead of just a singular case at a time.

tiefling ,

It’s not always whole hours

Zagorath ,
@Zagorath@aussie.zone avatar

To be fair, they did say “and for some a half”.

Though that misses the Kathmandu, Eucla, and Chatham Islands, which are all :45.

Skullgrid ,
@Skullgrid@lemmy.world avatar

you have to program a meeting that reoccurs between DST observant & non observant states in the US and australia.

Good luck.

lugal ,

I hate to repeat myself but DST is garbage. I never said it’s good

LarkinDePark ,

Aren’t time zones quite straightforward?

How very dare you!?

KillingTimeItself ,

oh you sweet summer child, what you don’t know is going to come back to haunt you forever.

homoludens ,

Obligatory video when it comes to time zones: www.youtube.com/watch?v=-5wpm-gesOY

gravitas_deficiency ,

Worst is when someone fucked up the DB time configs at some point and you have datetimes in a column that fall during the “nonexistent” hour in which clocks skip ahead for DST, and you have to figure out what the fuck actually happened there, and where in the data pipeline tz data was either added or stripped (sometimes it’s both, and sometimes it’s not just once), and undo the timestamp fuckery.

Source: did that this week. Was not super awesome.

BigMikeInAustin ,

It’s pretty simple, actually. A village somewhere in Europe that is completely in the shade all day for part of the year has already proven it.

Mirrors.

We just need a ring of motorized mirrors around the Earth.

At hour 0, the mirrors will rotate to show sun all across the entire Earth.

At hour 12, the mirrors will rotate to put all of the Earth into night time.

That lets the entire Earth have the exact same synchronized time synchronized with the daylight.

The mirrors will block the sun from parts of the earth facing during the night.

The mirrors will constantly be rotating to keep the proper amount of sun light facing each part of Earth as the Earth rotates.

The mirrors will be solar powered.

This will fix it, right?

narc0tic_bird ,

Sounds feasible.

SVcross ,
@SVcross@lemmy.world avatar

I don’t see any way whatsoever that could mean this project is not viable.

MrFunnyMoustache ,

The Year: 2092

The Problem: Timezones are annoying

The Solution: Space mirrors! A series of mirrors in space would rotate to keep the entire planet under a single time zone. A perfect global time system is born!

Sounds like a great idea! With the best of intentions. What could possibly go wrong?

stoy ,

There have been several concepts drawn up about using space mirrors as a way to focus the light from the sun into a deathray

MrFunnyMoustache ,

That was a nod to Great Moments in Unintended Consequences. (Example)

Live_your_lives ,

I got that reference! Surprised to see it out in the wild.

bountygiver ,

Alternatively, we have this arbitrary standard of 9am means morning, if we share a single universal time, different places would just have a different arbitrary time being the “morning” instead.

mojo_raisin ,

Or, we could collectively realize time is but an illusion and transcend this silly problem.

MajorHavoc ,

Lunchtime, doubly so!

dgriffith ,

Time is a cube, and always will be.

mojo_raisin ,

Dave!?

KillingTimeItself ,

i would aruge that the arbitrary factor of “9am being morning” is entirely to do with the fact that morning is actually a solar time phenomenon, whereas global time does not have the concept of morning, since it is merely imitating the local solar time.

Local solar time being the literal point in the sky that the sun is in.

It gets even funnier if we include people who aren’t “normal” I for one, consider noon to be morning.

BigMikeInAustin ,

We could keep the 0 hour as the “middle” of the night and 12 being the “middle” of the day (though I’m not sure if that’s really the sun’s high spot for the day for any places).

But with fully controlled mirrors, we could make it exactly 12 hours, so we could just then switch to the 0 hour being when the sun comes up.

AnarchistArtificer ,

Now I’m thinking about an ex-programmer supervillain who does this as her big foray into supervillainy

alexc ,

I don’t know what the hate is unless you are trying to store time as a String property. There a special place in hell for all developers who do this.

IMHO, all you really need to know is an Epoch time stamp and whether it’s localized to the viewer or the creator… Not that complex. The problem with time zones is that politicians keep changing them

Honestly, I’d rather give the creator of NULL a slap.

dohpaz42 ,
@dohpaz42@lemmy.world avatar

I’m probably going to get a lot of hate for this, and I do recognize there have been problems with it all over the place (my code too), but I like null. I don’t like how it fucks everything up. But from a data standpoint, how else are you going to treat uninitialized data, or data with no value? Some people might initialize an empty string, but to me that’s a valid value in some cases. Same for using -1 or zero for numbers. There are cases where those values are valid. It’s like using 1 for true, and zero for false.

Whomever came up with the null coalescing operator (??) and optional chaining (?->) are making strides with handling null more elegantly.

I’m more curious why JavaScript has both null and undefined, and of course NaN. Now THAT is fucked up. Make it make sense.

pivot_root ,

To offer a differing opinion, why is null helpful at all?

If you have data that may be empty, it’s better to explicitly represent that possibility with an Optional<T> generic type. This makes the API more clear, and if implicit null isn’t allowed by the language, prevents someone from passing null where a value is expected.

Or if it’s uninitialized, the data can be stored as Partial<T>, where all the fields are Optional<U>. If the type system was nominal, it would ensure that the uninitialized or partially-initialized type can’t be accidentally used where T is expected since Partial<T> != T. When the object is finally ready, have a function to convert it from Partial<T> into T.

dohpaz42 ,
@dohpaz42@lemmy.world avatar

Ignoring the fact that a lot of languages, and database systems, do not support generics (but do already support null), you’ve just introduced a more complex type of null value; you’re simply slapping some lipstick on it. 😊

pivot_root ,

Type-safe lipstick :)

davidagain ,

In a discussion about whether null should exist at all, and what might be better, saying that Optional values aren’t available in languages with type systems that haven’t moved on since the 1960s isn’t a strong point in my view.

The key point is that if your type system genuinely knows reliably whether something has a value or not, then your compiler can prevent every single runtime null exception from occurring by making sure it’s handled at some stage and tracking it for you until it is.

The problem with null is that it is pervasive - any value can be null, and you can check for it and handle it, but other parts of your code can’t tell whether that value can or can’t be null. Tracking potential nulls is in the memory of the programmer instead of deduced by the compiler, and checking for nulls everywhere is tedious and slow, so no one does that. Hence null bugs are everywhere.

Tony Hoare, an otherwise brilliant computer scientist, called it his billion dollar mistake a decade or two ago.

coffeejoe ,

What’s wrong with NULL? How else can you differentiate between not having a value and having a blank value?

davidagain ,

The problem isn’t having empty values, it’s not tracking that in the type system, so the programmer and the compiler don’t have any information about whether a value can be null or not and the programmer has to figure it out by hand. In a complex program that’s essentially completely impossible. The innocently created bomb that causes your program to crash can be in absolutely any value.

There are ways to track it all by disallowing null and using optional values instead, but some folks would rather stick with type systems that haven’t moved on since the 1960s.

Pieresqi ,

I actually like DST

NocturnalMorning ,

No you don’t, stop telling lies.

Pieresqi ,

I do 👍

Zagorath ,
@Zagorath@aussie.zone avatar

A lot of things that people like are bad and should not be public policy.

Some individuals feeling like they like DST doesn’t counteract its significant health detriments.

snugglebutt ,
@snugglebutt@lemmy.blahaj.zone avatar

well that’s a domain

Zagorath ,
@Zagorath@aussie.zone avatar

Sorry, I don’t know what you mean.

snugglebutt ,
@snugglebutt@lemmy.blahaj.zone avatar

1000002112

Just kinda silly

Zagorath ,
@Zagorath@aussie.zone avatar

Oh, I see. Yeah I suppose it is, now that you point it out. It comes from:

  • .gov: the US government
  • .nih: the US National Institutes of Health
  • .nlm: the National Library of Medicine
  • .ncbi: the National Center for Biotechnology Information

But really, I only know it because it’s a very common host that comes up when you’re searching for published research papers. I just see “bunch of Ns .gov” and know it’s reliable.

omgarm ,

Inagine going back hundreds of years to convince everybody in the world to use the same time. “No I know not everybody has a clock, but if you could consider sunrise midday that would make my job in the future much easier.”

toddestan ,

The reason we have timezones is because of the railroads. Before the railroads came in, every town would have its own time, typically set so noon is the time when the sun is highest in the sky. This really wasn’t a problem, as back then it didn’t really matter that the time was different in every little burg.

Then the railroads came in. They needed things running on a coordinated time table out of necessity, and having every town with its own time was unworkable. I’m sure the railroads would have loved running everything off of the same clock everywhere because that would be simple. But people were too used to noon being the middle of the day, so instead we got the compromise of having timezones so that the railroads can still run on a coordinated time table, but also so that noon is still approximately the middle of the day as people were used to.

So the solution is just go back to the 1800’s and convince the railroads that timezones are actually silly and that they really should run everything based upon UTC. And if people want rail service to their town, they can just deal with not having 12PM being when the sun is highest in the sky.

davidagain ,

Well, UTC didn’t exist in 1800, it would have been GMT, and that might not have been too popular so soon after the war of independence. Even if you convinced all of the USA to use one time zone for the railways, it would be different elsewhere and you’d still get time zones.

Maybe you’d get further with the project with the airlines in the first half of the twentieth century, but I’m not sure that that level of internationalism would have gone down well in a rather war torn world.

dannoffs ,
@dannoffs@lemmy.sdf.org avatar

You know the system before timezones was way worse, right? Every town had their own time.

Crisps ,

That problem happened because there was no way to travel from town to town quickly so if the clocks were off nobody cared. The trains changed that.

SnotFlickerman ,
@SnotFlickerman@lemmy.blahaj.zone avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines