summaryrefslogtreecommitdiff
path: root/ext/pdo_firebird/php_pdo_firebird_int.h
diff options
context:
space:
mode:
authorLars Westermann <lwe@php.net>2007-10-30 16:26:25 (GMT)
committerLars Westermann <lwe@php.net>2007-10-30 16:26:25 (GMT)
commit1ac482c84bec1198d4649f92ba6a99ff4a535a1a (patch)
treeea4d64247104645f5c2cabd57814423c777a5985 /ext/pdo_firebird/php_pdo_firebird_int.h
parent7f49f956e8c6588c427307db38308c678270e51b (diff)
downloadphp-1ac482c84bec1198d4649f92ba6a99ff4a535a1a.tar.gz
- Added default timestamp format definitions (ISO 8601) (related to bug #36128, Interbase PDO)
Diffstat (limited to 'ext/pdo_firebird/php_pdo_firebird_int.h')
-rw-r--r--ext/pdo_firebird/php_pdo_firebird_int.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h
index 52ebba8..63dc7e1 100644
--- a/ext/pdo_firebird/php_pdo_firebird_int.h
+++ b/ext/pdo_firebird/php_pdo_firebird_int.h
@@ -31,6 +31,10 @@
#define PDO_FB_DIALECT 3
+#define PDO_FB_DEF_DATE_FMT "%Y-%m-%d"
+#define PDO_FB_DEF_TIME_FMT "%H:%M:%S"
+#define PDO_FB_DEF_TIMESTAMP_FMT PDO_FB_DEF_DATE_FMT " " PDO_FB_DEF_TIME_FMT
+
#define SHORT_MAX (1 << (8*sizeof(short)-1))
#if SIZEOF_LONG == 8
@@ -73,6 +77,11 @@ typedef struct {
/* the last error that didn't come from the API */
char const *last_app_error;
+ /* date and time format strings, can be set by the set_attribute method */
+ char *date_format;
+ char *time_format;
+ char *timestamp_format;
+
} pdo_firebird_db_handle;
@@ -115,6 +124,12 @@ extern struct pdo_stmt_methods firebird_stmt_methods;
void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, long line TSRMLS_DC);
+enum {
+ PDO_FB_ATTR_DATE_FORMAT = PDO_ATTR_DRIVER_SPECIFIC,
+ PDO_FB_ATTR_TIME_FORMAT,
+ PDO_FB_ATTR_TIMESTAMP_FORMAT,
+};
+
#endif /* PHP_PDO_FIREBIRD_INT_H */
/*