Kevin Littlejohn wrote:
Ok, mindlessly simple question time:
If you've got a time in epoch form (for example, coming out of a database), how would you translate that into a DateTime object?
Right now, you have to Python (via an external method or a product): import DateTime date=DateTime.DateTime(epochTime) In 1.10, the DateTime constructor will be available via the '_' special variable in DTML. Jim
KevinL
Jim Fulton wrote FR Chalaoux wrote:
Hi There,
Tying to play with date variable <!--#var date fmt=DayOfWeek-->, I Obtained the following error :
Do you have a date variable defined? It looks like you don't.
It you want the current date and time, use PrincipiaTime:
<!--#var PrincipiaTime fmt=DayOfWeek-->
(Note that this will be renamed ZopeTime in 1.10, although PrincipiaTime will still work.)
Jim
--------------- qnevhf@obsu.arg.nh --------------- Kevin Littlejohn, Technical Architect, Connect.com.au Don't anthropomorphise computers - they hate that.
-- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.