text
stringlengths
0
1.36k
**Alex Sexton:** Tz data.
**Mikeal Rogers:** Now it's called tz data, but back then it was called the Olson Database. If you look through it, you can realize what it kind of defied logic, because there's stuff in there like "new dictator takes over this country, adjust timezone by 15 minutes." So within this arbitrary geographic order, there's ...
If ISIS ever gets its own country, one of the first things they'll do to prove that they're a country is adjust their timezone. It's just a dickhead thing to do, that you know they'll end up doing. \[laughs\]
**Alex Sexton:** Yeah, that's why ISIS is a dickhead, because of the timezone manipulation. \[laughter\] Yeah, I think a lot of people don't realize that there are 30-minute and 15-minute offset timezones, and then there are some people who don't abide by daylight savings, certain states.
**Rachel White:** Smart states.
**Alex Sexton:** Yeah, so it's definitely not something that's figure-outable by any programmatic means. You just need all of the data hardcoded.
**Mikeal Rogers:** Yeah, and even DST isn't standardized. DST is just like an extra offset that you do sometimes, that you have to map for. It's really annoying.
Yeah, so now we have tz data, but loading all that data takes a while. It's one of the things that makes these libraries so big, they have to load all that timezone data. So it'd be really great if the browser included that timezone data, or included a better timezone object.
**Alex Sexton:** Well, Mikeal... I have some good news for you.
**Mikeal Rogers:** Yeah, tell me.
**Alex Sexton:** Last week my project for the week was Intel. There is Intel daytime, so there is some motion here, for what it's worth.
**Mikeal Rogers:** Yeah, and there's a new standard, too...
**Alex Sexton:** Like before '02?
**Mikeal Rogers:** What is it...? I think it's called Temporal. Maggie Pint, who's done some work on MomentJS is keenly aware of how annoying this situation is, and has a new proposal that's gonna go to the next TC39 meeting for a Temporal object, which is closer to some of the stuff that they have in Java and some oth...
**Rachel White:** A Temporal object?
**Mikeal Rogers:** Yeah. If you read the standard, it essentially introduces two new types. It introduces what's called a local date/time, and a zoned date/time. A zoned date/time obviously has a timezone attached to it, and a local date/time is what you used to call a floating time. This is one of the places where sch...
\[28:19\] But then you deal with floating times, and floating times are a real pain in the ass because it's literally a time somewhere. It should map to whatever you want to apply a localized date/time object. A good example of this is if you wanna say a particular day is a holiday globally, it would be that day, from ...
**Alex Sexton:** Yes, Mikeal.
**Mikeal Rogers:** It just sucks, it's really painful to deal with. \[laughs\]
**Alex Sexton:** So you're saying the solution is just wait till it goes through all stages at TC39 and then it gets implemented in the browser and then \*Boom!\* five years later we've got good natives in the browser?
**Mikeal Rogers:** So standards don't just make it through the standards process; they need help. One of the goals in bringing this up here - if you're interested and have had a painful time dealing with date/time objects of have any kind of experience, it'd be really great to get 1) your input on the standard (it's on...
**Rachel White:** I have a weird question... Actually, it's not a weird question; we'll see. This might just be me being naive, but can't people just have time being shown for themselves relative to where they are in the world? Or I guess there's too many use cases for people needing date and time for it to be that sim...
**Mikeal Rogers:** Well, the big one is like, when we scheduled this podcast, all three of us were in different timezones, so I can display a time to you that says 3 PM, but somewhere we have to know what those offsets mean in relation to each other in order to block out the same time to this podcast. Otherwise you're ...
**Alex Sexton:** Right. And as I joined, I was actually exiting the Earth at half the speed of light, so time was moving more quickly for me. Slowly... Alright.
**Rachel White:** So what are ways that some other languages handle it better? The one that I can think of off the top of my head was whenever I used to do a lot of Wordpress stuff and you wanted the PHP snippet in your footer, so that people knew what year your arbitrary copyright was... That was too totally easy to d...
**Alex Sexton:** I think it's less important to know what other languages do -- sorry, that was maybe a rude way to answer your question... But one of the key differences here is we have to ship this data to the browser a lot of times, so I think a lot of languages like PHP - it's been a while since I've done PHP, but ...
Maybe you don't get the weird month offset versus date offset thing that we get - that's just our own special joy - but we can't ship every last timezone and translation and everything of every different thing to the browser every time, because you're just gonna have to ship half a megabyte of time-related things with ...
\[32:06\] I think it's very important that these become native, built-in standards that ship with browsers, much like collation, or whatever.
**Rachel White:** That makes sense.
**Mikeal Rogers:** Yeah. I mean, it's really complicated to load them dynamically, and if you send them all no matter what, then the JavaScript bundle size is gonna be really big and then Alex Russell's gonna cry and he's gonna yell at you on Twitter, so you've gotta keep that down.
**Alex Sexton:** Both of those things are just guaranteed gonna happen regardless, so... \[laughter\] Change your behavior, basically... I mean, he's right, but...
**Mikeal Rogers:** \[laughs\] There you go. But other languages, 1) they actually do have better timezones built in, a lot of them do. And even when they don't, it's a backend; you can keep that stuff on disk and not really care.
**Alex Sexton:** ...hit the Linux, yeah.
**Mikeal Rogers:** Yeah. In doing the research for this, I was curious if Olson was still maintaining that database by himself or not...
**Alex Sexton:** There was just recently a change... Wasn't there like a copyright issue with that, or something?
**Mikeal Rogers:** Yeah, in 2011 he got sued by somebody, an Atlas company, because they claimed that he was using something from their Atlas. The end result is that the EFF got them to drop their lawsuit, but he put it into ICANN after that, so that he wouldn't be personally liable anymore and getting sued.
**Alex Sexton:** Yeah, donate to the EFF, everybody.
**Mikeal Rogers:** Yes, exactly. \[laughs\] So now it actually isn't a standards body, which is good. Hopefully we can see an easier path to getting it everywhere and in stuff by default.
**Alex Sexton:** This is only a slight tangent, but I really liked the arc of the MomentJS project; I think it's kind of a beautiful arc. Tim R. Wood starts MomentJS as a pretty new JavaScript developer and he's like "Hey, I see the need for this all the time..." and you can even see him get better as a JavaScript deve...
Then as more primitives and natives and more specific modules come out, it's seeing less usage and less contributions, and stuff like that. But it also got donated into the jQuery Foundation and now has the long-term support there. So the whole arc of the project is a very good example of people coming together and doi...
**Mikeal Rogers:** Yeah, MomentJS is fantastic. It's really good for creating human-readable date/times in your application. So everybody out there listening, if you're working with this and you need to display nice text about what's going on, definitely use MomentJS and don't try to write your own thing, please. Pleas...
**Rachel White:** Please... You'll anger people and then they'll complain about it.
**Mikeal Rogers:** Yeah, it's just one of those problem spaces that is really easy to underestimate, let me put it that way.
**Rachel White:** Well, it's a concept that is ingrained into your being as a human. You would think that you understand it enough to be like, "Oh yeah, I could totally make something", but it's way more complicated than just being able to look at a clock and count.
**Mikeal Rogers:** And like most things, it's the people that make it difficult, right? It's the governments that make it difficult and complicated. With that, I think that we've maybe beaten this horse to death a little bit. We'll probably take a quick break, and when we come back we're gonna talk a little bit about G...
**Rachel White:** Yaay!
**Break:** \[36:18\]
**Mikeal Rogers:** Alright, let's jump into it... We've got a new project of the week, Glitch. This is the first project that wasn't just an open source GitHub repo; this is actually like a slightly larger project for learning. Rachel, why don't you tell us a bit about this?
**Rachel White:** Sure. Glitch is this site that is from Fog Creek and it's really, really awesome, especially for pair programming. It's a coding environment that's similar to -- if you've used any web editors like the CodePen or JSFiddle or anything of that sort... Glitch takes that to the next level, that is a super...
But wait... There's more. It gets better. You can either use it for live coding to be able to show people what you're working on as you're working on it (in real time) or you can have it be real-time and collaborative. One situation that I could see this being useful for is I'm not very good at backend things, so if I'...