Skip to content

Instantly share code, notes, and snippets.

@lucasbento
Created March 19, 2016 12:52
Show Gist options
  • Save lucasbento/3ab544be66eea5725d1c to your computer and use it in GitHub Desktop.
Save lucasbento/3ab544be66eea5725d1c to your computer and use it in GitHub Desktop.
Get start and end of given timestamp
$timestamp = 1458356400;
$startOfDay = strtotime('midnight', $timestamp);
$endOfDay = strtotime('tomorrow', strtotime('midnight', $timestamp)) - 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment