[Patches] [ python-Patches-452232 ] timestamp function for time module
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 17 Aug 2001 14:37:38 -0700
Patches item #452232, was opened at 2001-08-17 14:37
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452232&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gareth Harris (garethharris)
Assigned to: Nobody/Anonymous (nobody)
Summary: timestamp function for time module
Initial Comment:
Timestamp creates timestamp strings
in ISO or ODBC format in UTC or local timezones.
It can also add microseconds where needed.
Timestamps are often needed
outside database or XML activities,
so its proposed location is the time module.
timestamp(secs=None,fmt='ISO',TZ=None,fracsec=None):
'''Make ISO or ODBC timestamp from [current] time.
Parameters:
secs= float seconds, else default = time()
fmt = 'ISO' use ISO 8601 standard format =
"YYYY-MM-DDTHH:MM:SS.mmmmmmZ" Zulu or
"YYYY-MM-DDTHH:MM:SS.mmmmmm-hh:mm" local
else "YYYY-MM-DD HH:MM:SS.mmmmmm" ODBC
TZ = None=GMT/UTC/Zulu, else local time zone
fracsec = None, else add microseconds to string
'''
Any improvement or standardization is welcome.
Gareth Harris
gharris@nrao.edu
2001-08-17T21:36:00Z
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452232&group_id=5470