Relative Content

Tag Archive for phpdatetimetimefuture

How to prevent PHP from converting TIME into DATES in the FUTURE?

I have a view of a database that shows the cumulative hours each person has attended work in the month, so it is common for users to have 80:00:00 hours per month, but when I try to “echo” the value obtained from the database view, PHP insists on adding the hours to the current date, so it converts 80 hours into 3 days 8 hours and instead of printing 80:00:00 it prints a date of 3 days 8 hours in the future along with a warning: