Package: ut2d
ut2dut2d(unix timestamp to datetime) is a tiny command-line utility to convert unix timestamp into human readable datetime. This tool intends to use the least amount of related packages or the complicated calculations and convertions on datetime topic, and provide a very simple interface to help you convert unix timestamp in a super quick manner.Here is a list of all functionalities supported (details are inExamplessection):get datetime of given ut;get datetime of now;get datetime and calculate time difference from now;get datetime and find the given time in certain timezone;get datetime and find the given time (with scrapper) in certain city (any city);If you work with unix timestamp a lot or need a tiny utility to get the time of another city that linuxdatecommand cannot provide,ut2dcan hopefully make your life a little bit easier.Installationprerequisite:Python 3.6or above$ pip install ut2dExamplesget datetime of given UT$ut2d1547671090Unix Timestamp: 1547671090.0Local: Wed, Jan 16, 2019 03:38PMGMT  : Wed, Jan 16, 2019 08:38PMget datetime of now$ut2dnowUnix Timestamp: 1547671189.5133939Local: Wed, Jan 16, 2019 03:39PMGMT  : Wed, Jan 16, 2019 08:39PMget datetime and calculate time difference from now$ut2d1547671090-dUnix Timestamp: 1547671090.0Local: Wed, Jan 16, 2019 03:38PMGMT  : Wed, Jan 16, 2019 08:38PMGiven time is 11 mins, 5 secs agoget datetime and find the given time in certain timezoneProvide timezone with prefix "GMT" or "UTC".$ut2dnow-tz"GMT+8"Unix Timestamp: 1550257565.5289779Local: Fri, Feb 15, 2019 02:06PMGMT  : Fri, Feb 15, 2019 07:06PM😎  The given time in GMT+8 is: Sat, Feb 16, 2019 03:06AM.get datetime and find the given time in certain cityThis is done by scraping the city's timezone from search engines, and calculate the datetime of the given unix timestamp of the given city.If searching "New York"... (I'm in Boston)$ut2d1547671090-d-c"New York"Unix Timestamp: 1547671090.0Local: Wed, Jan 16, 2019 03:38PMGMT  : Wed, Jan 16, 2019 08:38PMGiven time is 15 mins, 42 secs ago😛  I am finding your city on popular search engines! Plz wait a sec...😎  I suppose the given time in New York is: Wed, Jan 16, 2019 03:38PM. I have 88% confidence with this result from search engines!You can usenowwith the-cflag to get the local time of any city, and you can even use other languages. e.g. 北京 is Beijing, and Montreuil-Juigné is a city in France.$ut2dnow-c"北京"Unix Timestamp: 1547673691.203567Local: Wed, Jan 16, 2019 04:21PMGMT  : Wed, Jan 16, 2019 09:21PM😛  I am finding your city on popular search engines! Plz wait a sec...😎  I suppose the given time in 北京 is: Thu, Jan 17, 2019 05:21AM. I have 88% confidence with this result from search engines!$ut2dnow-c"Montreuil-Juigné"Unix Timestamp: 1547673563.7226071Local: Wed, Jan 16, 2019 04:19PMGMT  : Wed, Jan 16, 2019 09:19PM😛  I am finding your city on popular search engines! Plz wait a sec...😎  I suppose the given time in Montreuil-Juigné is: Wed, Jan 16, 2019 10:19PM. I have 88% confidence with this result from search engines!You can search anything here! But if it cannot find on the search engines it will not print out the time.LicenseThis software is distributed under theMIT license.AuthorWritten byBinghuan Zhang