Time Zones
Investigating into the Date class to discover how can we find a way to create a time that isn't influenced by our current timezone.
Video Transcript
00:00The last step that's left is actually to create a date and time so users could actually know what actually is the time that the event is going to happen.
00:09Now, if I passed into the time, an actual time, then it would be really, really hard for me to figure out what time is it in all the places of the world.
00:18Now, the way time works in Flash, it actually works based on milliseconds, and I want to show you how this works.
00:23So, I'm going to go into the browser again, because I know I'm going to use the time, I'm going to need time.
00:28So, I'm going to go into my Google S3, and I'm going to search for date object. The date object controls also time.
00:33So, I'm going to search into the date, and I'm going to see the first value that comes up at googles3.com is the ActionScript 3 date object.
00:41And we're going to look into that class and look into the information that we could get out of it.
00:45And if we just scroll a bit, we're going to see that one of the options here, and we're trying to look for something that is not affected by any time zone.
00:56And we'll see that time is actually that value, and that value is the number of milliseconds since midnight January 1st, 1970.
01:04Universal time for a date object.
01:07Alright, so do we care that it's from January 1st, 1970? Not that much.
01:12But what we care about is basically this time is actually going to be milliseconds that start from a specific time in the past.
01:19What that is going to enable me is going to enable me then to know exactly how many milliseconds passed since then, which will then make it easier for me to then render a different time in different machines.
