ZopeTime breakage since CDT became CST
Hi everyone, I posted on this topic a week or so ago, but I've since found another example of the problem. This is such a simple thing that I'm wondering if there's something broken in Zope. Here's what happens: I post our school's daily lunch menus on our site. The menus are retrieved from the ZCatalog and each menu has a date attribute that gives that date for that menu. What is supposed to happen is that the current day's menu gets displayed until 12:35 p.m. (the end of the lunch period) and then switches to the next menu after that. This worked perfectly until the recent time change. Here's the PythonScript that retrieves the menu: """ Retrieve the next lunch menu from the Catalog """ currentTime = context.ZopeTime() if currentTime > context.ZopeTime().earliestTime() + 12.583/24: tomorrow_earliest = context.ZopeTime().earliestTime() + 1 else: tomorrow_earliest = context.ZopeTime().earliestTime() next_week_latest = context.ZopeTime().latestTime() + 7 return context.nutrition.menus.Catalog( {'school' : 'Henry Sibley High School', 'menu_date' : [tomorrow_earliest, next_week_latest], 'menu_date_usage' : 'range:min:max', } ) Doing <dtml-var ZopeTime() fmt="pCommon"> gives the correct time. Currently, the menus switch at 1:35 p.m. Anyone have an idea what to do? Is there a problem with the earliestTime() method perhaps? -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.com W. St. Paul, MN | | http://slashdot.org wilson@visi.com | <dtml-var pithy_quote> | http://linux.com
From: "Dieter Maurer" <dieter@handshake.de> To: "Tim Wilson" <wilson@visi.com>
I remember I saw a similar problem in the mailing list. I think there was a solution.
participants (3)
-
Dieter Maurer -
Lennart Regebro -
Tim Wilson