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?
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.
© 2022 - 2024 — McMap. All rights reserved.