Re: Converting 1276290588 to readable date/time
[email protected] Mon, 14 Jun 2010 13:08:30 -0500
| Newsgroups | gmane.linux.mandrake.newbie |
|---|---|
| Message-ID | <[email protected]> |
There are many ways to do that. That number is the number of seconds elapsed since epoch (Midnight, Jan 1, 1970). You can use a complex math formula including Zeller's congruence or you can use a language that already knows how to convert epochal time.... Here it is in Python >>> import time >>> x=time.time() >>> x 1276538631.151 >>> time.localtime(x) time.struct_time(tm_year=2010, tm_mon=6, tm_mday=14, tm_hour=10, tm_min=3, tm_se c=51, tm_wday=0, tm_yday=165, tm_isdst=1) >>> time.asctime(time.localtime(x)) 'Mon Jun 14 10:03:51 2010' >>> Margrave > I forgot how to do this, any help appreciated. > > -- > Chris > KeyID 0xE372A7DA98E6705C > > ____________________________________________________ Want to buy your Pack or Services from Mandriva? Go to http://store.mandriva.com Join the Club : http://www.mandrivaclub.com ____________________________________________________