Comments (5)
From [email protected] on December 04, 2011 14:08:27
I would be ok with 1 but at the dal level (no truncation when retrieving) but I do not want to milliseconds to appear in forms. It only confuses users. Perhaps the milliseconds could be stripper by the IS_DATETIME/IS_TIME validators?
from web2py.
From [email protected] on February 03, 2012 21:40:57
Attaching a diff against git trunk ( 8fbae09 ). Only lightly tested, but seems to do the job for me; please review and comment, as I test (and possibly fix problems), I'll fix it so that it can be integrated with trunk. I haven't tested it enough, so I don't claim it is ready for integration - but I would be happy for comments.
Notes: as is, requires Python>=2.6; I can incorporate e.g. http://stackoverflow.com/questions/698223/how-can-i-parse-a-time-string-containing-milliseconds-in-it-with-python for 2.5, or disable fractional second mode for 2.5
I can't test with informix / oracle which have special cases.
Added tests to the test_dal.py
Attachment: dal.patch test_dal.patch
from web2py.
From [email protected] on February 05, 2012 16:20:36
took a look at the dal.patch, overall it looks good by visual inspection. some comments from my perspective:
- i would utilize this on GAE where i still have apps using python2.5 (yes i know i need to upgrade, but GAE still considers python2.7 support as beta). i guess you could argue that i need to upgrade, but i think since web2py still support 2.5 this should as well
- in parse_time and parse_datetime you don't account for your WARNING setting, and you slightly change the parsing behavior i think.
otherwise looks OK to me.
from web2py.
From [email protected] on February 05, 2012 16:46:48
Thanks.
For python2.5, that also needs to include the subsecond time parser from stack overflow above (or something equivalent). mxDateTime has a good parser, but it's a shame to pull it in as a dependency just for this.
About warning setting in prase: thanks, I'll fix that. I'm not actually using warning or parse_* myself, so I missed that (I configure sqlite to return them as datetime objects)
you slightly change the parsing behavior i think.
Yes, but I think the change is only to reject wrong things that would have previously been accepted (silently and wrongly), such as: "1:2:3:4:". But when in truncate (compatibility) mode, it should remain completely the same as before, I think?
from web2py.
@niphlod @mdipierro The proposed fix is already closed, can we close this issue too? Related to https://github.com/web2py/web2py/pull/542/files
from web2py.
Related Issues (20)
- Security.md does not provide how to report a security vulnerability HOT 1
- PAM authorization bypass due to incorrect usage
- UF-8 error HOT 1
- Admin application fails on Python 3.10 in version 2.23.0 HOT 2
- SSLv3 unknown certificate
- web2py 2.23.0 is giving a 403 error when I try to package my applications
- SECURITY: JQuery 1.2 < 3.5.0 Multiple XSS
- Scheduler does not exit on OperationalError HOT 9
- Lack of checking if the supplied value is numerical in SQLFORM.grid search function HOT 2
- scheduler.py AttributeError: '_thread._local' object has no attribute '_scheduler'
- SECURITY: Vulnerable to HTTP Response Splitting
- Error when searching with SQLFORM.grid with order field selected HOT 1
- Add to book recipie? - How to host web2py with python3 on cpanel server
- blank admin
- Circular import
- About Sessions Storage
- web2py does not work with Python 3.12 HOT 3
- The new version (2.27.1) does not work for me HOT 1
- SECURITY.md contains no email contact
- db.export_to_csv_file does not correctly back up a database with record versioning enabled. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web2py.