The SQL used to manage dates and times varies by database type. The code to generate this SQL (e.g., DATE_FORMAT()
or FROM_UNIXTIME()
) has historically been handled by modules that work with dates and times, wrapped in long switch statements to handle the officially supported databases. (more or less.) A d.o issue raised the possibility of a date abstraction API, but nothing ever came of it.
Similar to #2888, this is code that was created to support PostgreSQL in Silkscreen and is submitted here because the non-PostgreSQL part of the patch is valid for Backdrop, even if all it accomplishes is better encapsulation of database code in the database classes.
Unlike #2888 and #2889, this is a little more invasive, changing the date_sql_handler
class in the Date module, and several Views handlers.
As with #2888, I'm submitting this because I consider it good open source etiquette to provide patches to parent projects, even if the patch's true purpose cannot be realized upstream, in this case database independence.
Recent comments
I’m working on a group within the project comunidadthreads.com I launched using BackdropCMS, where I’ll be posting short, easy-to-follow tutorials for anyone interested in learning how to build...
Let’s Bring BackdropCMS to the Spanish-Speaking Community
I could create tutorials, with images and screenshots, that explain step by step how to install and use BackdropCMS, designed especially for non-technical people. The idea is to create clear...
Let’s Bring BackdropCMS to the Spanish-Speaking Community
We have had Spanish Language sessions at Backdrop LIVE in the past. If anyone would like to facilitate a session at Backdrop LIVE in Spanish OR about creating more Spanish resources, that would...
Let’s Bring BackdropCMS to the Spanish-Speaking Community