Join Kevin Skoglund for an in-depth discussion in this video List time zones, part of Easy PHP Projects: Time Zone Conversion.
- [Voiceover] In this chapter, we're going to begin…a new PHP project…which at the end will display the current times…in major cities around the world.…Let's begin by setting up an HTML page…that lists out time zones.…You can see that I've added a new directory…to my Sites directory called…current_world_times.…And that's for my new project.…Inside here I've got two files:…index.php and styles.css.…If you have access to the exercise files,…those will be included there.…Let's take a look at it.…I'm going to open up in project view in TextMate…so that I can see index.php and styles.css.…
Inside index.php, you can see I'm calling…timezone_identifiers_list to get a list…of all the time zones.…We've done that a few times now,…so hopefully that's familiar to you.…Then I've got a basic HTML page,…title of Current World Times…floating in that styles.css stylesheet.…And then inside the div for main-content…I've got an h1 that also says Current World Times…and then a loop that's just looping…through each of those $tz_idents,…
- 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.