Guest User

Untitled

a guest
Sep 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Python
  2. ======
  3.  
  4. >>> status_id = int(184846323277770752)
  5. >>> timestamp = (status_id >> 22)
  6. >>> print timestamp
  7. 44070797748
  8. >>> timestamp = (status_id >> 22) + 1288834974657
  9. >>> print timestamp
  10. 1332905772405
  11. >>> import time
  12. >>> print time.ctime(timestamp/1000)
  13. Wed Mar 28 00:36:12 2012
  14.  
  15. PHP
  16. ===
  17.  
  18. php > $status_id = '184846323277770752';
  19. php > $timestamp = ($status_id >> 22);
  20. php > echo $timestamp;
  21. 511
  22. php > $timestamp = ($status_id >> 22) + '1288834974657';
  23. php > echo $timestamp;
  24. 1288834975168
  25.  
  26. The integer value of var on success, or 0 on failure. Empty arrays return 0, non-empty arrays return 1.
  27.  
  28. 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.
  29.  
  30. 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