it's not a bug per se. The problem is that there isn't around a javascript widget that maps the "python notation" to format datetime to strings (or parse, the reverse operation) with a perfect 1:1 mapping . In this case, you're facing the inability for the calendar widget to know what "%Z" is.
On Wednesday, May 7, 2014 4:01:29 AM UTC+2, Michael Beller wrote: > > While updating my app to handle timezones, I came across a problem with > the datetime widget. > > Model: > db.define_table('sometable', > Field('appointment', 'datetime'), > auth.signature) > > Controller Action: > def index(): > grid = SQLFORM.grid(db.sometable, user_signature=False) > return dict(grid=grid) > > Language Translation for %Y-%m-%d %H:%M:%S: > %Y-%m-%d %H:%M:%S %Z > > If I open index.html, then select add record, then select a datetime > using the widget for the appointment field, the widget inserts a value such > as: > 2014-05-06 21:49:59 %Z (which then produces a form validation error: "Enter > date and time as 1963-08-28 14:30:59 %Z") > > If I manually replace the "%Z" with "EDT" then the record saves. > > Is this a bug? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.