Trees | Indices | Help |
|
---|
|
1 ########################################################################### 2 # 3 # This program is part of Zenoss Core, an open source monitoring platform. 4 # Copyright (C) 2007, Zenoss Inc. 5 # 6 # This program is free software; you can redistribute it and/or modify it 7 # under the terms of the GNU General Public License version 2 as published by 8 # the Free Software Foundation. 9 # 10 # For complete information please visit: http://www.zenoss.com/oss/ 11 # 12 ########################################################################### 13 14 """Time 15 16 Utilities for consistent manipulation of Dates and Time. All simple 17 code should migrate here, and without dependencies on anything other 18 than standard python libraries. 19 20 $Id:$""" 21 22 __version__ = "$$"[11:-2] 23 24 import time 25 3032 value = _maybenow(gmtSecondsSince1970) 33 secs = value % 60 34 return time.strftime("%Y/%m/%d %H:%M:%%06.3f", time.localtime(value)) % secs3537 value = _maybenow(gmtSecondsSince1970) 38 return time.strftime("%Y/%m/%d %H:%M:%S", time.localtime(value))3941 value = _maybenow(gmtSecondsSince1970) 42 return time.strftime("%m/%d/%Y", time.localtime(value))43 4648 value = _maybenow(gmtSecondsSince1970) 49 return time.strftime("%Y%m%d%H%M%S", time.localtime(value))5052 value = _maybenow(gmtSecondsSince1970) 53 return time.strftime("%H:%M:%S", time.localtime(value))5456 return "Saved at time: " + HHMMSS()57 70
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Oct 25 16:28:38 2007 | http://epydoc.sourceforge.net |