O'Reilly logo

Zend PHP Certification Study Guide by Zend Technologies

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Managing Dates and Times

Terms You’ll Need to Understand

  • UNIX time stamp

  • UNIX epoch

  • date arrays

  • UTC

  • Format strings

Techniques You’ll Need to Master

  • Handling dates in PHP

  • Getting the current date

  • Converting a string into a date

  • Formatting dates and times

In this chapter, you will learn how to parse and manipulate dates and times in PHP. Handling dates and times is an important day-to-day skill for many PHP programmers. You will learn how to generate times from various date formats and multiple ways of formatting dates in strings.

How PHP Handles Dates

In PHP, you deal with dates and times in three basic formats:

  • UNIX time stamps

  • Date arrays

  • String-formatted dates

Internally, PHP uses UNIX time stamps, which are the standard method of telling time on ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required