Did you know that 2015 equals 11111011111 in binary, a palindrome?
Oh, and by the way, on May 15th, 2015 at 02:09:25 UTC, Unix time will be 1010101010101010101010101010101.

seen from United Kingdom

seen from Canada

seen from Dominican Republic
seen from China
seen from China
seen from United Kingdom
seen from United Kingdom
seen from United Kingdom

seen from Australia

seen from United States
seen from United States
seen from China

seen from United States

seen from Colombia

seen from Malaysia

seen from Singapore
seen from United States

seen from United States
seen from United States
seen from South Korea
Did you know that 2015 equals 11111011111 in binary, a palindrome?
Oh, and by the way, on May 15th, 2015 at 02:09:25 UTC, Unix time will be 1010101010101010101010101010101.
Fixed Converting unix timestamp string to readable date in Python #dev #it #asnwer
Fixed Converting unix timestamp string to readable date in Python #dev #it #asnwer
Converting unix timestamp string to readable date in Python
I have a string representing a unix timestamp (i.e. “1284101485”) in Python, and I’d like to convert it to a readable date. When I use time.strftime, I get a TypeError:
>>>import time >>>print time.strftime("%B %d %Y", "1284101485") Traceback (most recent call last): File "", line 1, in TypeError: argument must be 9-item sequence, not…
View On WordPress
How to: Getting "unixtime" in Java
How to: Getting "unixtime" in Java
Getting "unixtime" in Java
Date.getTime() returns milliseconds since Jan 1, 1970. Unixtime is seconds since Jan 1, 1970. I don’t usually code in java, but I’m working on some bug fixes. I have:
Date now = new Date(); Long longTime = new Long(now.getTime()/1000); return longTime.intValue();
Is there a better way to get unixtime in java?
UPDATE
Based on John M’s suggestion, I ended up with:
retur…
View On WordPress
Fixed Python Create unix timestamp five minutes in the future #dev #it #asnwer
Fixed Python Create unix timestamp five minutes in the future #dev #it #asnwer
Python Create unix timestamp five minutes in the future
I have to create an “Expires” value 5 minutes in the future, but I have to supply it in UNIX Timestamp format. I have this so far, but it seems like a hack.
def expires(): '''return a UNIX style timestamp representing 5 minutes from now''' epoch = datetime.datetime(1970, 1, 1) seconds_in_a_day = 60 * 60 * 24 five_minutes =…
View On WordPress
How to: Converting unix timestamp string to readable date in Python
How to: Converting unix timestamp string to readable date in Python
Converting unix timestamp string to readable date in Python
I have a string representing a unix timestamp (i.e. “1284101485”) in Python, and I’d like to convert it to a readable date. When I use time.strftime, I get a TypeError:
>>>import time >>>print time.strftime("%B %d %Y", "1284101485") Traceback (most recent call last): File "", line 1, in TypeError: argument must be 9-item sequence, not…
View On WordPress
How to: Converting unix timestamp string to readable date in Python
How to: Converting unix timestamp string to readable date in Python
Converting unix timestamp string to readable date in Python
I have a string representing a unix timestamp (i.e. “1284101485”) in Python, and I’d like to convert it to a readable date. When I use time.strftime, I get a TypeError:
>>>import time >>>print time.strftime("%B %d %Y", "1284101485") Traceback (most recent call last): File "", line 1, in TypeError: argument must be 9-item sequence, not…
View On WordPress
How to: Python Create unix timestamp five minutes in the future
How to: Python Create unix timestamp five minutes in the future
Python Create unix timestamp five minutes in the future
I have to create an “Expires” value 5 minutes in the future, but I have to supply it in UNIX Timestamp format. I have this so far, but it seems like a hack.
def expires(): '''return a UNIX style timestamp representing 5 minutes from now''' epoch = datetime.datetime(1970, 1, 1) seconds_in_a_day = 60 * 60 * 24 five_minutes =…
View On WordPress