Skip to content

Instantly share code, notes, and snippets.

@safecat
Last active August 29, 2015 14:01
Show Gist options
  • Save safecat/0ee392004c3ce468aebb to your computer and use it in GitHub Desktop.
Save safecat/0ee392004c3ce468aebb to your computer and use it in GitHub Desktop.
Uniqid to datetime
<?php
//based on http://jason.pureconcepts.net/2013/09/php-convert-uniqid-to-timestamp/
echo echo date('Y-m-d H:i:s', hexdec(substr('53796ed677000', 0, -5)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment