Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python
- ======
- >>> status_id = int(184846323277770752)
- >>> timestamp = (status_id >> 22)
- >>> print timestamp
- 44070797748
- >>> timestamp = (status_id >> 22) + 1288834974657
- >>> print timestamp
- 1332905772405
- >>> import time
- >>> print time.ctime(timestamp/1000)
- Wed Mar 28 00:36:12 2012
- PHP
- ===
- php > $status_id = '184846323277770752';
- php > $timestamp = ($status_id >> 22);
- php > echo $timestamp;
- 511
- php > $timestamp = ($status_id >> 22) + '1288834974657';
- php > echo $timestamp;
- 1288834975168
- The integer value of var on success, or 0 on failure. Empty arrays return 0, non-empty arrays return 1.
- The maximum value depends on the system. 32 bit systems have a maximum signed integer range of -2147483648 to 2147483647. So for example on such a system, intval('1000000000000') will return 2147483647. The maximum signed integer value for 64 bit systems is 9223372036854775807.
- Strings will most likely return 0 although this depends on the leftmost characters of the string. The common rules of integer casting apply.
Add Comment
Please, Sign In to add comment