[Feature]: A date and date-time field type
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Read crates/data/src/value.rs for the existing field and value types, then review the format readers and writers named in the issue, including crates/data/src/filegdb.rs, source/fgb.rs, and source/postgis.rs. The proposal leaves key design questions unresolved and spans multiple formats, editing, queries, projects, and the time slider. Work can start once maintainers agree on the date model and scope; done means date values round trip with the intended schema and work in the agreed consumers.
Written by the indexing model from the issue text.
Description
What problem does this solve?
FieldType has Integer, Double, Text and Boolean (crates/data/src/value.rs), so every date RustGIS reads becomes text:
- Shapefile
Dfields are read asYYYY-MM-DDtext and written back as Character fields. - File Geodatabase date, date-only, time-only and date-time-offset fields come in as text (
crates/data/src/filegdb.rs:284). - FlatGeobuf
DateTimecolumns (source/fgb.rs:525), PostGIS timestamps (source/postgis.rs) and spreadsheet dates (sheets.rs, as ISO text) arrive as text as well. edit.addFieldhas no date type.
Dates are central to everyday work: permit, application, hearing and expiry dates; inspection logs; crash and count records. As text they sort only when ISO-formatted, can't be compared in a where clause (issued >= '2026-01-01' compares strings), and break in Calculate Field (issued + 30 gives 2026-06-0330). A round trip through Shapefile or GeoPackage also changes the schema, so a county system that expects a date column gets a text one back.
Several roadmap items already assume dates exist: date formats in pop-up templates, date controls in quick filters, and the time slider. The time slider currently guesses which fields hold dates by sampling 500 values and accepting a field when 60% of them parse (crates/map/src/time.rs).
Proposed solution
This changes the data model, so I'm asking how you'd like it shaped before anyone builds it. A starting point:
- The type. Add
FieldType::Date(a calendar day) andFieldType::DateTime(an instant, stored as UTC with any offset applied), and matchingValuevariants. Use one plain integer representation, so nothing depends onstd::timeand the wasm build is unaffected. - Read and write it in each format:
- Shapefile
D; - GeoPackage
DATE/DATETIME; - FileGDB date kinds;
- GeoParquet/Arrow
date32/timestamp; - FlatGeobuf
DateTime; - CSV and spreadsheets: detected like the time slider does today, or chosen when adding the file.
- GeoJSON stays text on write, as ISO 8601.
- Shapefile
- Where it shows up:
edit.addFieldgainsdateanddatetime.- The table shows dates in the user's format and edits them with a date picker.
- Where clauses compare dates.
- The time slider uses date fields directly and keeps its guessing for text.
- Calculate Field date arithmetic waits for the expression engine.
- Projects:
.rgisfiles gain the new values. Older projects keep their text fields; a "convert field to date" command could follow.
Questions for a maintainer:
- One type with an optional time, or two types?
- Should time-only fields (FileGDB has them) stay text?
- Should this land before the expression engine, or as part of it?
I'm glad to help build it once the shape is agreed.
Estimated scope
Wishlist: a larger or longer-term idea
Alternatives considered
- Keep dates as ISO text and teach each consumer to parse it. This is what the time slider does today. It works for display and the slider, but leaves the schema round trip and comparisons wrong, and every consumer repeats the guessing.
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 268
- Avg merge
- 3h 8m
- Merged PRs (30d)
- 688
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opengeos/RustGIS
-
[Bug]: Project Raster (#953) bilinear differs from gdalwarp when downsampling and next to no-dataOpenbug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
unconfirmed possible issue
Difficulty 3/5 1-2 days Newbie friendliness 52/100
opengeos/RustGIS#970 · 7 comments ·
Maintainers usually reply within 1 day
-
[Feature]: Ask to save unsaved changes when RustGIS is quit on macOS (Cmd+Q, Dock)Possibly taken @Mavrick-F claimed this today. Openenhancement upstream-issue
opengeos/RustGIS#966 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature]: Open GeoLibre (.geolibre) projects as mapsPossibly taken @Mavrick-F claimed this today. Openenhancement
opengeos/RustGIS#962 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature]: Intersect, Identity, Union and Near toolsPossibly taken @Mavrick-F claimed this today. Openenhancement
opengeos/RustGIS#959 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in opengeos/RustGIS
Similar issues
-
bug llm translation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
accounts bug decoding
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
wboayue/rust-ibapi#1088 ·
Maintainers usually reply within 1 day
-
chmod -v: missing 'could not be accessed' line for operands that can't be stat'edPossibly taken @emirmrkaljevic claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
gtk-rs/gtk-rs-core#2068 ·
Maintainers usually reply within 6 days