[Gdal-dev] OGR Date Support
Chapman, Martin
MChapman at sanz.com
Wed Feb 15 12:08:06 EST 2006
Very nice. Thanks Frank!
Martin
-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Frank
Warmerdam
Sent: Tuesday, February 14, 2006 9:33 PM
To: gdal
Subject: [Gdal-dev] OGR Date Support
Folks,
I have committed preliminary date support for OGR. This includes a new
core date type (OFTDate), and would be more accurately called "date
time"
support.
The OGRField union now includes another struct option that looks like:
struct {
GInt16 Year;
GByte Month;
GByte Day;
GByte Hour;
GByte Minute;
GByte Second;
GByte TZFlag; /* 0=unknown, 1=localtime(ambiguous),
100=GMT, 104=GMT+1, 80=GMT-5, etc */
} Date;
The TZFlag is a funky mechanism to incorporate timezones by offset from
GMT (in 15 minute increments). But if you just leave TZFlag 0 the
timezone
is unknown which I suspect will often be the case.
Note there is no sub-second precision. My hope is that this isn't too
important in the OGR context.
So far only the PostgreSQL and Shapefile (dbf) drivers have been
updated with date support. I plan to extend it to MySQL this week.
Over time it will be added in a few more drivers with native date types.
Let me know if anyone runs into problems with the builds that might
be related.
Best regards,
--
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/gdal-dev
More information about the Gdal-dev
mailing list