Reputation: 5335
i have a "simple" problem with the PHP timestamp (on a linux machine).
I need to get the user birthdate in year-month-date (using 3 menus - html select). When the user is born on 1970-1-1 the timestamp is zero and the application logic gets everything wrong.
How would you deal with this case?
Regards,
Upvotes: 1
Views: 589
Reputation: 9370
Try using built in DateTime class instead (http://php.net/manual/en/class.datetime.php)
Upvotes: 0
Reputation: 41939
As long as your dates are between the years 1901-2038 the PHP native date
functions should work OK. Timestamps should not be used for birth dates. If you need to use dates outside if this range, take a look at the ADOdb Date Time Library.
Upvotes: 2