Public Member Functions | |
| def | __init__ |
| def | formatTime |
| Formats a time object. | |
| def | formatTimeDiff |
| Formats a the difference between now and the supplied parameter. | |
| def | formatDateTime |
| Formats a time object. | |
Static Public Attributes | |
| tuple | formatTime = staticmethod(formatTime) |
| tuple | formatTimeDiff = staticmethod(formatTimeDiff) |
| tuple | formatDateTime = staticmethod(formatDateTime) |
Definition at line 23 of file timeUtil.py.
| def objects.logic.utils.timeUtil.timeUtil.__init__ | ( | self | ) |
Formats a time object.
| t | Integer (something like what time.time() would return) |
Definition at line 62 of file timeUtil.py.
00062 : 00063 try: 00064 fmt = time.localtime(t) 00065 except Exception, e: 00066 logger.log(__name__ + ": Could not contruct time object from input") 00067 return "" 00068 00069 return time.strftime("%m/%d/%y %H:%M:%S", fmt) 00070 00071 00072 00073 00074
Formats a time object.
| t | Integer (something like what time.time() would return) |
Definition at line 30 of file timeUtil.py.
00030 : 00031 try: 00032 fmt = time.localtime(t) 00033 except Exception, e: 00034 logger.log(__name__ + ": Could not construct time object from input") 00035 return "" 00036 00037 return time.strftime("%H:%M:%S", fmt) 00038 00039 ## Formats a the difference between now and the supplied parameter.
Formats a the difference between now and the supplied parameter.
| t | Integer (something like what time.time() would return) |
Definition at line 43 of file timeUtil.py.
00043 : 00044 Hrs = int(t / 3600) 00045 00046 remainder = t % 3600 00047 00048 Min = int(remainder/60) 00049 00050 remainder = t % 60 00051 00052 Secs = int(remainder) 00053 00054 retString = "%d Hrs %d Min %d Sec" % (Hrs, Min, Secs) 00055 return retString 00056 00057 00058 ## Formats a time object.
tuple objects.logic.utils.timeUtil.timeUtil.formatDateTime = staticmethod(formatDateTime) [static] |
Definition at line 77 of file timeUtil.py.
tuple objects.logic.utils.timeUtil.timeUtil.formatTime = staticmethod(formatTime) [static] |
Definition at line 75 of file timeUtil.py.
tuple objects.logic.utils.timeUtil.timeUtil.formatTimeDiff = staticmethod(formatTimeDiff) [static] |
Definition at line 76 of file timeUtil.py.
1.5.8