codeguy/php-the-right-way — pull request #128 by grakic (2012-07-19 23:27:47+00:00)
Title: Add content on working with date and time

- Date and time is not easy, but DateTime can help
- Add a word on time zones and why it is wrong to calculate in seconds and not in date intervals
- new \DateTime gives the current date and time
- Extends example to show comparison, date difference (very common) and date period usage
- Fix links to php docs
- Wrap to 120 chars

I tried to send this as comments to PR #126 but as it was closed, i am making an new request.

@tvlooy, the idea to include the section on DateTime is great and I like it very much. I tried to make the example a little more like a story, and avoid repeating date and time reading/formatting. What do you think about those changes?