[Zope-Checkins] CVS: Zope2 - Application.py:1.150.2.1 DTMLMethod.py:1.66.2.1 FindSupport.py:1.24.14.1 Image.py:1.130.2.1

andreas@serenade.digicool.com andreas@serenade.digicool.com
Fri, 15 Jun 2001 13:59:17 -0400


Update of /cvs-repository/Zope2/lib/python/OFS
In directory serenade:/tmp/cvs-serv8742/lib/python/OFS

Modified Files:
      Tag: ajung-mxdatetime
	Application.py DTMLMethod.py FindSupport.py Image.py 
Log Message:
savepoint


--- Updated File Application.py in package Zope2 --
--- Application.py	2001/06/01 19:51:16	1.150
+++ Application.py	2001/06/15 17:58:44	1.150.2.1
@@ -90,7 +90,7 @@
 import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_
 import time, traceback, os, string, Products
 from string import strip, lower, find, rfind, join
-from DateTime import DateTime
+from mx.DateTime import DateTime,now
 from AccessControl.User import UserFolder
 from App.ApplicationManager import ApplicationManager
 from webdav.NullResource import NullResource
@@ -247,7 +247,8 @@
 
     def PrincipiaTime(self, *args):
         """Utility function to return current date/time"""
-        return apply(DateTime, args)
+        if len(args)==0: return now() 
+        else: return apply(DateTime, args)
     ZopeTime=PrincipiaTime
 
     ZopeAttributionButton__roles__=None

--- Updated File DTMLMethod.py in package Zope2 --
--- DTMLMethod.py	2001/06/07 22:18:44	1.66
+++ DTMLMethod.py	2001/06/15 17:58:45	1.66.2.1
@@ -97,7 +97,7 @@
 from webdav.Lockable import ResourceLockedError
 from webdav.WriteLockInterface import WriteLockInterface
 from ZDOM import ElementWithTitle
-from DateTime.DateTime import DateTime
+from mx.DateTime import now,ARPA
 from urllib import quote
 import  Globals, sys, Acquisition
 from AccessControl import getSecurityManager, full_read_guard
@@ -287,7 +287,7 @@
         
         rows=max(1,atoi(dtpref_rows)+dr)
         cols=max(40,atoi(dtpref_cols)+dc)
-        e=(DateTime('GMT') + 365).rfc822()
+        e=ARPA.strGMT(now()+365)
         resp=REQUEST['RESPONSE']
         resp.setCookie('dtpref_rows',str(rows),path='/',expires=e)
         resp.setCookie('dtpref_cols',str(cols),path='/',expires=e)

--- Updated File FindSupport.py in package Zope2 --
--- FindSupport.py	2001/04/27 20:27:41	1.24
+++ FindSupport.py	2001/06/15 17:58:45	1.24.14.1
@@ -91,7 +91,7 @@
 from AccessControl.Permission import name_trans
 from Globals import DTMLFile
 from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
-from DateTime import DateTime
+from mx.DateTime import DateTimeFrom
 from string import find
 from AccessControl import getSecurityManager, full_read_guard
 
@@ -135,7 +135,7 @@
                 obj_metatypes=None
                 
             if obj_mtime and type(obj_mtime)==type('s'):
-                obj_mtime=DateTime(obj_mtime).timeTime()
+                obj_mtime=DateTimeFrom(obj_mtime).ticks()
 
             if obj_permission:
                 obj_permission=p_name(obj_permission)
@@ -227,7 +227,7 @@
                 obj_metatypes=None
                 
             if obj_mtime and type(obj_mtime)==type('s'):
-                obj_mtime=DateTime(obj_mtime).timeTime()
+                obj_mtime=DateTimeFrom(obj_mtime).ticks()
 
             if obj_permission:
                 obj_permission=p_name(obj_permission)

--- Updated File Image.py in package Zope2 --
--- Image.py	2001/06/07 22:18:44	1.130
+++ Image.py	2001/06/15 17:58:45	1.130.2.1
@@ -98,7 +98,7 @@
 from cStringIO import StringIO
 from Globals import Persistent
 from Acquisition import Implicit
-from DateTime import DateTime
+from mx.DateTime import DateTimeFrom
 from Cache import Cacheable
 from mimetools import choose_boundary
 from ZPublisher import HTTPRangeSupport
@@ -214,7 +214,7 @@
             # of the way they parse it).
             # This happens to be what RFC2616 tells us to do in the face of an
             # invalid date.
-            try:    mod_since=long(DateTime(header).timeTime())
+            try:    mod_since=long(DateTimeFrom(header).ticks())
             except: mod_since=None
             if mod_since is not None:
                 if self._p_mtime:
@@ -260,7 +260,7 @@
                 else:
                     # Date
                     date = string.split(if_range, ';')[0]
-                    try: mod_since=long(DateTime(date).timeTime())
+                    try: mod_since=long(DateTimeFrom(date).ticks())
                     except: mod_since=None
                     if mod_since is not None:
                         if self._p_mtime: