Join Kevin Skoglund for an in-depth discussion in this video Challenge: Use major cities, part of Easy PHP Projects: Time Zone Conversion.
- [Voiceover] In this movie, I'm going to give you…a challenge to complete.…I'd like you to create a PHP page which shows the…current time in major cities around the world.…Put this as a new file inside our…current_world_times directory…and call it cities.php.…That way, we'll still have that index.php…we can go and refer back to if we need to.…So, keep it separate, cities.php.…Examples of major cities might be Tokyo,…New York, Paris, you can use any cities you like.…In my solution, I'm going to use a list…of the top 25 most populous cities.…
I will give you a hint.…The best starting place here is to create an array…of each city with it's timezone.…I think you have all the skills to complete this challenge.…If you get stuck, in the next movie,…I'll show you the solution that I came up with.…
- Understanding the history and purpose of time zones
- Setting a default time zone in PHP
- Using the PHP DateTime and DateTimeZone classes
- Working with daylight saving time transitions
- Allowing users to select their time zone
- Displaying times in the user's preferred time zone
- Calculating the current times of major cities
- Creating a complete time zone calculator
Skill Level Beginner
1. About Time Zones
2. Default Time Zone
3. Working with Time Zones in PHP
4. User Time Zone Selection
5. Respect the User's Time Zone
6. Current World Times
7. Time Zone Calculator
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.