use local for displaying timestamps
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3443 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
3ea934076f
commit
e0e82dd571
1 changed files with 5 additions and 2 deletions
|
@ -25,8 +25,11 @@ $Id$
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
def timeStamp2ISO(ts):
|
def timeStamp2ISO(ts, useGM=False, format='%Y-%m-%d %H:%M'):
|
||||||
return time.strftime('%Y-%m-%d %H:%M', time.gmtime(ts))
|
fct = useGM and time.gmtime or time.localtime
|
||||||
|
return time.strftime(format, fct(ts))
|
||||||
|
#return time.strftime('%Y-%m-%d %H:%M', time.gmtime(ts))
|
||||||
|
#return time.strftime('%Y-%m-%d %H:%M', time.localtime(ts))
|
||||||
|
|
||||||
def getTimeStamp():
|
def getTimeStamp():
|
||||||
return int(time.time())
|
return int(time.time())
|
||||||
|
|
Loading…
Add table
Reference in a new issue