[web2py] Re: IS_DATE() and timezones

2015-10-26 Thread Julian Sanchez
Thanks for the heads-up!! Switching over to datetime as we speak (and working pretty good!!!) Best, Julian On Sunday, October 25, 2015 at 6:29:24 PM UTC-5, Anthony wrote: > > FYI, we're going to remove the timezone option from IS_DATE (which doesn't > work anyway), so you're better off using a

[web2py] Re: IS_DATE() and timezones

2015-10-25 Thread Anthony
FYI, we're going to remove the timezone option from IS_DATE (which doesn't work anyway), so you're better off using a datetime field and setting the time to midnight. Anthony On Sunday, October 25, 2015 at 12:02:48 PM UTC-4, Julian Sanchez wrote: > > Thanks Anthony, great insight. > > Most data

[web2py] Re: IS_DATE() and timezones

2015-10-25 Thread Julian Sanchez
Thanks Anthony, great insight. Most data is user-generated so the intent is to imply midnight at the user's timezone, translate to UTC for storage, then apply the user's timezone when displaying/editing. Can certainly switch to datetime field and zero out the time. Cheers, Julian On Sunday,

[web2py] Re: IS_DATE() and timezones

2015-10-25 Thread Anthony
It appears to be a bug in the IS_DATE validator -- the code expects the date object to have a tzinfo attribute, but only datetime and time objects have that attribute. More generally, it is not clear how one should apply transformations to dates based on timezones. If you know the date in UTC t