Plugins/VcsPlugins/vcsPySvn/SvnUtilities.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
19 Module function to return a formatted time string. 19 Module function to return a formatted time string.
20 20
21 @param seconds time in seconds since epoch to be formatted (float or long) 21 @param seconds time in seconds since epoch to be formatted (float or long)
22 @return formatted time string (string) 22 @return formatted time string (string)
23 """ 23 """
24 return QDateTime.fromTime_t(long(seconds))\ 24 return QDateTime.fromTime_t(int(seconds))\
25 .toTimeSpec(Qt.LocalTime)\ 25 .toTimeSpec(Qt.LocalTime)\
26 .toString("yyyy-MM-dd hh:mm:ss") 26 .toString("yyyy-MM-dd hh:mm:ss")
27 27
28 def dateFromTime_t(seconds): 28 def dateFromTime_t(seconds):
29 """ 29 """
30 Module function to return the date. 30 Module function to return the date.
31 31
32 @param seconds time in seconds since epoch to be formatted (float or long) 32 @param seconds time in seconds since epoch to be formatted (float or long)
33 @return date (QDate) 33 @return date (QDate)
34 """ 34 """
35 return QDateTime.fromTime_t(long(seconds)).toTimeSpec(Qt.LocalTime).date() 35 return QDateTime.fromTime_t(int(seconds)).toTimeSpec(Qt.LocalTime).date()
36 36
37 def getServersPath(): 37 def getServersPath():
38 """ 38 """
39 Public method to get the filename of the servers file. 39 Public method to get the filename of the servers file.
40 40

eric ide

mercurial