This date is commonly referred to as the Unix
epoch. Therefore, the incongruously formatted dates in the previous example would
actually be represented as 1183578300 and 1197069420, respectively.
?– Caution You may be wondering whether it??™s possible to work with dates prior to the Unix epoch
(00:00:00 UTC January 1, 1970). Indeed it is, at least if you??™re using a Unix-based system. On Windows,
due to an integer overflow issue, an error will occur if you attempt to use the timestamp-oriented functions
in this chapter in conjunction with dates prior to the epoch definition.
PHP??™s Date and Time Library
Even the simplest of PHP applications often involves at least a few of PHP??™s date- and
time-related functions. Whether validating a date, formatting a timestamp in some
particular arrangement, or converting a human-readable date value to its corresponding
timestamp, these functions can prove immensely useful in tackling otherwise quite
complex tasks.
?– Note While your company may be based in Ohio, the corporate Web site could conceivably be hosted
anywhere, be it Texas, California, or even Tokyo. This may present a problem if you??™d like date and time
representations and calculations to be based on the Eastern Time Zone because by default PHP will rely
on the operating system??™s time zone settings. You can, however, change your Web site??™s time zone
through the date.
Pages:
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402