unix时间戳和时间转换

jsonkey@ubuntu:~/health$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> import datetime
>>> s=datetime.datetime(2010,6,29,22,12,20)
>>> time.mktime(s.timetuple())
1277820740.0
>>>

你可能感兴趣的:(unix,python,ubuntu,gcc)