work around more time bugs in MySQLdb

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@76 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/CVSDB_PRODUCTION
jpaint 2000-04-23 22:50:51 +00:00
parent 2217f50d1c
commit f79830925a
1 changed files with 8 additions and 1 deletions

View File

@ -251,7 +251,14 @@ class CheckinDatabase:
def AddCommit(self, commit):
dbType = commit.GetTypeString()
dbCI_When = DBI.TimestampFromTicks(commit.GetTime())
## MORE TIME HELL: the MySQLdb module doesn't construct times
## correctly when created with TimestampFromTicks -- it doesn't
## account for daylight savings time, so we use Python's time
## module to do the conversion
temp = time.localtime(commit.GetTime())
dbCI_When = DBI.Timestamp(temp)
dbWhoID = self.GetAuthorID(commit.GetAuthor())
dbRepositoryID = self.GetRepositoryID(commit.GetRepository())
dbDirectoryID = self.GetDirectoryID(commit.GetDirectory())