Join Kevin Skoglund for an in-depth discussion in this video Solution: Create a maintenance page, part of Easy PHP Projects: Time Zone Conversion.
(Theme music)…- [Voiceover] In this movie I'm gonna show you the solution…that I came up with for creating a maintenance page…which is time sound sensitive.…As you can see I added a new page…to my time zone sensitivity directory…called maintenance dot php.…We can take a look at that here.…I've got some basic HTML inside of it…very similar to what we had in our index page…I just copied from that as a starting point.…It says Notice of Upcoming Maintenance Window…and then it has text that says…this website will be offline for routine maintenance…from and then I put span tags with class time.…
So it will turn the text red.…And then inside I'm just echoing the start time…and the end time.…So I've gotta come up with those two values…start time and end time…so they get dropped in appropriately.…Up to the top of the file I take care of that business.…I start up by opening my session…so that I can then use my get user timezone function…that we wrote in the previous movies…so I'm using the exact same thing there…to get the user's time zone.…
- 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?
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.