/How to use Time Zone APIs in Azure Maps | Azure Friday

How to use Time Zone APIs in Azure Maps | Azure Friday

Video: How to use Time Zone APIs in Azure Maps | Azure Friday


>> Hey, friends, it's another episode of Azure Friday and I'm going to learn all about time zones in Azure Maps from Julie. How are you? >> Good, how are you? >> I'm pretty good. Time zones pretty much suck. >> Yeah. >> With daylight savings times, it get even more complicated. >> It's tricky and they change constantly. >> That's a good point, it isn't a static thing. I think we might think it's a database, just take a Json file and it's always the same. >> Yeah. >> It change like monthly, almost.

>> Oh yeah, countries are updating them constantly. Then there's some countries that use daylight savings time and even with the United States, Hawaii and Arizona do not respect daylight savings time. >> It's disrespectful. So, what's important about that then is that I don't have a database of time zones. I really need an API that's smart about time zones. >> Yeah. You need a service to find out the latest with the time zone information. >> All right. >> Which is what we are providing. >> Let's see the service. >> All right, let me show you. So, the first thing I want to show you is the ability to get the time zone by coordinates. So, if I say a particular location and they have a latitude and longitude, I can get back to the time zone that that particular coordinate is in. So, I'll show you that real quick. So, basically, I've just provided the- >> I saw 33.55 and minus 117.

>> My location. >> That where you are? I have no idea where that is. >> This location is actually Tijuana. >> Nice. >> I picked something interesting. >> That's cool. >> So, you get back the information about what time zone idea this is this is America Tijuana, and you get back that it's Pacific Standard Time, and then information about offsets, and this is really cool too, the wall time. So, you can see what time it is there right now. >> I see that the wall time is interesting. I like the way they phrase that because that is, there's all kinds of Zulu time, and this time, that time, an offset time. But, what is someone going to see if they look at the wall in Tijuana right now. >> Yeah, this is really helpful if you're coordinating meetings with people across the globe. So you can get this wall time back and find out what time is it there, when I'm in this meeting with them. >> That's really interesting that you say that because I'm thinking about Azure Maps in terms of maps, but it's really geographic information, and I want to build a meeting timer application or meeting planner.

READ  Unbelievable THINGS you never knew about 10 ANDROID APPS ? ✔️

>> Yeah. >> I think that the world's great meeting planner app has not yet been created. We could build it on top of an Azure Map's API. >> Yeah. On top of that, so we support different formats for the IDs as well. So, there's this concept of IANA IDs, which is the Internet Assigned Numbers Authority. >> There's a whole place in charge of assigning numbers to stuff? >> In charge of these numbers. >> Okay. >> So, this is a standard set of IDs, and so, you can get back that entire set of IDs with this particular API. >> Okay. >> So, I'm going to call this, and it will just return me all of the IANA IDs that exist today for time zones. >> And this sounds silly, but it is important when you saw before, was that America/Tijuana. That's not just an arbitrary string, that's an official assigned thing. >> Yes. >> It's like DNS for time zone. It's not going to change, it's important.

>> Exactly, and this is how you get the updated list too. So if you pull this list back, you can start to see the differences. If there's new ones added or things that are removed. >> Oh, good point. >> So, this is the full list. >> Okay. >> Now that I have this full list, let's say I search through here, and I found one that I wanted to know some more information about. So, I want to look it up by IANA ID. This time instead of location, I'm using IANA ID. So, for this particular one, I picked America's St. Lucia, and it gives me information about the different aliases, the countries they're included. >> That's such a good point because there are other things in that time zone, and any one of them is valid to represent the time zone. >> And it tells you the countries and the names of the countries that are included in this time zone. So, it gives you back a lot of information about that particular time zone.

READ  How Mario Can Fly – SOLVED! | The SCIENCE!... of Mario

>> That is super useful. >> And again, the wall time as well. >> Time zones are so complicated, I mean people don't even know like there's people have PHDs in time zone, it's complicated. I'm glad there is a service that I could just release that and let someone else handle it. >> Yes. The other thing we support is Windows Timezone IDs. So, there's a different set of IDs that are used by Windows or Windows Developers, and we can provide that full list to you as well. So, this also gets updated. I'm first just going to grab that whole list just to show you. So, they have different names. These ones are called different, have different IDs. >> Sure. >> Daylight Standard Time, UTC 11. All these different things.

>> Right. I've actually, I'm familiar with these because I wrote a blogging engine awhile back and our blogging engine, we ended up using a text file and it's now woefully out of date. So, I could probably call this API to re-populate that, but it's really complicated if you think about the server time, the time that the server got that page, and then the time on the wall of the person whose browser just hit it. What timezone do you show, like when did I publish the post, when did I show the post to them? All those kind of things, if you try to do it yourself, you're going to get hurt. >> It's very complicated. >> Let an API or service handle that for you. >> Yes, and get all of the updates for you as well, so you don't have to go out there searching for those updates. >> Indeed.

READ  How To Turn on TalkBack, Android's Screen Reader

>> The last one I'm going to show you. So, now you have those Windows IDs, and if you want to get back the IANA ID associated with that particular Windows ID, you can search for that, and we will give that back to you. So, we will provide that mapping. So, for this particular query, I decided to look for Hawaii in Standard Time, one of my favorite places to be this time of the year. >> Where we wish we were right now. >> Exactly. So, I'll send that, and then I will get back the associated IANA IDs for that particular Windows ID, and you can see there's a Pacific Honolulu, Pacific, all these different things too. >> So, you can map from any of the standard API either as a Windows Developer or as a web developer, and that apply that to whatever you're doing. Of course, we store all of our times in UTC, so you can then translate to any time zone you want? >> Exactly. >> Very cool. Thanks so much. I am learning about how deceptively complicated time zones are and how Azure maps makes it easy today on Azure Friday.