Replies: 2 comments 9 replies
-
FWIW, I have been trying some more with time zones but have ended up with some confusion.
So from this, it looks like datetime values do know their timezone, but it's hidden when you display them. I note that even the format_datetime function doesn't have a way to extract or display the timezone, so I'm not sure if it's really part of the value at all. But if I insert the values into a table, then it behaves differently:
The times have been converted. Either both were converted to UTC before being stored in the database, and then converted to local system time when retrieved or displayed; or, both were converted to local system time for storage, then displayed as-is. It's very confusing when you compare to the following, which makes you think they are the same:
except they're not:
I'm running this on a Mac. If I stop proton, change my timezone from London (UTC+1) to Bangkok (UTC+7), and restart proton, then:
My best guess, then, is that times are stored in UTC (or as Unix time?), but are normally displayed in local time, except for the unexplained oddity around rendering of Anyway, this is something I definitely need to get a handle on, as it's pretty crucial to the operation of a time-based event logging database! |
Beta Was this translation helpful? Give feedback.
-
Hi @candlerb , thank you very much for trying Proton and sharing your suggestions for the docs. To track those suggested edits and discuss item by item easier, do you mind creating a PR for https://github.com/timeplus-io/docs? |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm a newbie to Proton which looks awesome, and going through the docs I have a few minor nits to flag.
At https://docs.timeplus.com/glossary under "view"
Should this be "expanded" not "expected"?
At https://www.timeplus.com/post/introducing-mutable-streams there is a formatting issue:
I think that should be
_tp_time
At https://docs.timeplus.com/eventtime
That's inconsistent: in the first sentence it said that
trip_end
was the default end time, and that agrees with the following clause:But then it's also inconsistent with the following section:
I think those should say
trip_start
.At https://docs.timeplus.com/proton-ingest-api#push-data-to-timeplus
But then it goes on to show exactly the same format, i.e. the original example was already in the form that doesn't repeat the column names (so we don't know what that was)
The list of functions appears to be incomplete. I notice for example that
unhex()
is mentioned in passing under ipv6_num_to_string, but it doesn't seem to be documented elsewhere (although hex is)I also have a few questions:
select now();
gives me the local time.Experimentally, it looks like by default "NOT NULL" is handled as a constraint but ignored; Null values are just zero values, and Null can be inserted regardless of "NOT NULL" constraint:
However, the avro data types section does mention
nullable(T)
as a proton data type, and that is accepted:Perhaps this ought to be mentioned at https://docs.timeplus.com/datatypes ?
How does the internal representation of NULL compare to a not-null value? For example, with ipv4 is there perhaps a fixed 5-byte structure regardless of whether the value is null or not, or do null values take up less space than not-null values?
(I'm thinking of a record which might use ipv4 or ipv6, whether I should have one column of each, and make them both nullable)
OK, that's enough for now! But I'm also interested if anyone has any example use cases of:
Many thanks,
Brian.
Beta Was this translation helpful? Give feedback.
All reactions