[Zope] Time fields in MSSQL/ODBC (urgent!)

Jay, Dylan djay@lucent.com
Tue, 15 Jun 1999 15:04:32 +1000


A better solution to your problem is to replace the DateTime.py file at 664
with the following. I havn't tested it thoughly but it works for me. I'll
see if I can get this in the base otherwise anyone who's timezone hasn't
been explicitly defined will suffer from the same fustration.


   except: 
      try: 
        t= time()
        localzone = mktime(gmtime(t)) - t
        localzone = int(round(-localzone/(60*60)))
        if (localzone >=0):
          localzonename = '+'+str(localzone)
        else:
          localzonename = str(localzone)
        _localzone = _cache._zmap[lower('GMT'+localzonename)] 
      except: _localzone=''