I am attempting to get the 0-value timestamp in an PHP API. I am currently using Carbon in a Laravel / Dingo API based system.
Is there a simple way to get the 0-value timestamp (presumably something like 01/01/1970) without hardcoding the date?
You could try:
echo Carbon::createFromTimestamp(0)->toDateString();
// Displays: 1970-01-01
So you do not have to hardcode the date, just use a 0
timestamp.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With