Abstract
PHP does not have a variable type dedicated to storing date or time values. Instead, integers are used to indicate the number of seconds before or since January 1st, 1970, also called Epoc. When dates and times are treated as a single value they are called a timestamp. The use of integers makes it easy to calculate differences between two timestamps as ordinary math applies.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Frank M. Kromann
About this chapter
Cite this chapter
Kromann, F.M. (2016). Dates and Times. In: PHP and MySQL Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0605-8_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-0605-8_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-0606-5
Online ISBN: 978-1-4842-0605-8
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books