libgda r3292 - in trunk: . doc/C/tmpl libgda libgda/sqlite



Author: vivien
Date: Wed Jan 21 20:03:08 2009
New Revision: 3292
URL: http://svn.gnome.org/viewvc/libgda?rev=3292&view=rev

Log:
2009-01-21  Vivien Malerba <malerba gnome-db org>

	* libgda/sqlite/gda-sqlite-meta.c: fix for bug #568570
	* libgda/gda-value.c: corrected gda_value_new_timestamp_from_timet()
	to correclty handle the results of localtime() (thanks to Tim Lapawa)


Modified:
   trunk/ChangeLog
   trunk/doc/C/tmpl/gda-value.sgml
   trunk/libgda/gda-value.c
   trunk/libgda/sqlite/gda-sqlite-meta.c

Modified: trunk/doc/C/tmpl/gda-value.sgml
==============================================================================
--- trunk/doc/C/tmpl/gda-value.sgml	(original)
+++ trunk/doc/C/tmpl/gda-value.sgml	Wed Jan 21 20:03:08 2009
@@ -535,9 +535,9 @@
 
 </para>
 
- year: 
- month: 
- day: 
+ year: representation of the date
+ month: month representation of the date, as a number between 1 and 12 
+ day: day representation of the date, as a number between 1 and 31 
 @hour: 
 @minute: 
 @second: 

Modified: trunk/libgda/gda-value.c
==============================================================================
--- trunk/libgda/gda-value.c	(original)
+++ trunk/libgda/gda-value.c	Wed Jan 21 20:03:08 2009
@@ -1181,8 +1181,8 @@
         ltm = localtime ((const time_t *) &val);
         if (ltm) {
                 GdaTimestamp tstamp;
-                tstamp.year = ltm->tm_year;
-                tstamp.month = ltm->tm_mon;
+                tstamp.year = ltm->tm_year + 1900;
+                tstamp.month = ltm->tm_mon + 1;
                 tstamp.day = ltm->tm_mday;
                 tstamp.hour = ltm->tm_hour;
                 tstamp.minute = ltm->tm_min;

Modified: trunk/libgda/sqlite/gda-sqlite-meta.c
==============================================================================
--- trunk/libgda/sqlite/gda-sqlite-meta.c	(original)
+++ trunk/libgda/sqlite/gda-sqlite-meta.c	Wed Jan 21 20:03:08 2009
@@ -222,7 +222,7 @@
 		{"integer", "gint", "Signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value", "int"},
 		{"real", "gdouble",  "Floating point value, stored as an 8-byte IEEE floating point number", NULL},
 		{"text", "string", "Text string, stored using the database encoding", "string"},
-		{"blob", "GdaBinary", "Blob of data, stored exactly as it was input", NULL},
+		{"blob", "GdaBlob", "Blob of data, stored exactly as it was input", NULL},
 		{"timestamp", "GdaTimestamp", "Time stamp, stored as 'YYYY-MM-DD HH:MM:SS.SSS'", NULL},
 		{"time", "GdaTime", "Time, stored as 'HH:MM:SS.SSS'", NULL},
 		{"date", "GDate", "Date, stored as 'YYYY-MM-DD'", NULL},



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]