Talk in English - US at Longhorn PHP 2025
                                                    
                            Track Name:
                                                            Hill Country C
                                                                                    
                                                    
                                                        View Slides: https://scott.keck-warren.com/blog/2025/taming-time-in-php-best-practices-and-gotchas-longhorn-php-2025/ 
                                                                                                                                                                    
                        
                        Short URL: https://joind.in/talk/5be45
                        (QR-Code (opens in new window))
                    
Time is one of the hardest problems in software even if you're not working across time zones, formats, and legacy systems. In this talk, you’ll learn how to manage time effectively in PHP web applications, including how to handle daylight saving transitions, properly use `DateTimeImmutable`, and avoid pitfalls in date math. Whether you're maintaining a legacy system or building greenfield, this session will equip you with the tools and patterns to avoid time-related bugs and improve code reliability.
Comments
Please login to leave a comment
Another great Scott Keck-Warren production, full of great details about working with dates + times safely in PHP. I also love the "Brief History of Time" segment at the beginning, where Scott told us all about how time tracking has evolved throughout the course of humanity.
One suggestion: it's worth mentioning that while you can modify/add/sub DateTimeImmutable instances, the return value will be a *new* instance ('cause, you know, immutable).
Really enjoyed the bit of history around date and time and all the fun facts sprinkled in. The straightforward, practical advice was much appreciated. Really helpful session on tackling the tricky parts of working with dates in apps.