Working with Date and Time in PHP

Date and time are so basic, that we often forget its complexity. Look into the functions and classes in PHP, to deal with all the different date and time formats used across the globe. See how PHP handles timezone and daylight savings.
Course info
Level
Beginner
Updated
Jun 27, 2019
Duration
2h 16m
Table of contents
Description
Course info
Level
Beginner
Updated
Jun 27, 2019
Duration
2h 16m
Description

Date and time are so basic, that we often forget its complexity. These are found everywhere, in all applications, be it the timestamp columns in the database, or logging data into the log files. The date format varies in different places. In this course, Working with Date and Time in PHP, you will familiarize yourself with foundational knowledge and gain the ability to use classes and functions to work with time and date. First, you will learn functions to work with time and date, which would be valid for everyone across any timezone. Next, you will discover how to deal with daylight saving. Finally, you will explore how to use dates when it comes to using MySQL with PHP. When you’re finished with this course, you will have the skills and knowledge to know how PHP handles the timezones and daylight saving, making the task even easier.

About the author
About the author

Annapurna is a full stack developer and has experience in Android App and web development. She likes sharing knowledge so that the developers around get boost for their passion.

More from the author
Consuming a REST API with Guzzle and PHP
Intermediate
1h 27m
Aug 29, 2019
Android: Room Fundamentals
Beginner
2h 27m
Dec 7, 2018
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone! My name is Annapurna Agrawal, and welcome to my course on Working with Date and Time in PHP. I'm a full stack developer, and I like teaching and sharing knowledge and info for making your day-to-day development tasks easy. Date and time are so basic that we often forget its complexity. They are found everywhere in all the applications, be it the timestamp columns in the database or logging data into the log file. Across the globe, the adopted date and time formats vary. The globe is divided into more than 24 times zones. Now while you create an app, these are to be considered when you have an audience from across the globe. In this course, we are going to cover everything that relates to date and time in PHP. Some of the major topics that we will cover include handling the date and time in an object-oriented way using DateTime class, dealing with the time zone and daylight savings from any corner of the world. Next, we will learn using the DatePeriod and DateInterval classes to get the list of recurring dates and times. And then we will find out the sunrise and sunset timings for anyplace on the earth. By the end of this course, you'll be able to implement any date/time-related functionality in your application. But before beginning the course, you should be familiar with the basics of PHP, HTML, and CSS. You should also be able to understand the object-oriented programming. You should know the basics of CRUD operation in MySQL. And you should have a web server running at least PHP 7. For referencing the exercise files, you'll need to place them in your cellar root folder to be able to run them instantly while catching up with the course. With this I hope you'll join me on this journey to learn and explore working with the date and time in PHP only at Pluralsight.