clockworklabs / SpacetimeDB

Multiplayer at the speed of light
https://spacetimedb.com
Other
4.37k stars 110 forks source link

[STABILITY] Specific Timestamp type in the SDK #1375

Open cloutiertyler opened 4 months ago

cloutiertyler commented 4 months ago

Mario: Then does this means adding chrono? Trying of use u64 instead internally is a footgun similar to how bool in SQLite is 1/0 (ie: Lets add proper date types, it also matters to match sQL spec)

If you use a timestamp in a table or as a reducer argument, then its going to generate a u64 which is unintuitive.

mamcx commented 3 months ago

I agree is desirable to have concrete types. The issue is that dates have several:

https://docs.rs/chrono/latest/chrono/

This probably require a proposal

cloutiertyler commented 3 months ago

I'm going to leave this open, but I suspect this should really be defined by: https://github.com/clockworklabs/SpacetimeDBPrivate/issues/839

Wherein we would just choose to use a u64 or something so as to not impose our own opinion about how you should represent timestamps in a given language.