-
For now, I use an integer field with microtime(true) value to save time as an integer value (saving actual time) For display I plan to use method and display time in readable form - only hour, minutes, seconds and thousands of seconds (like for some race timing). But I will need to edit this field too. Is there other way? Somehow to use datetime type field? I think that this is not supported in e107, at least I haven't find anything in code. But maybe I am mistaken. Thank you for any help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
There is an example implementation of a datetime picker in e107 at The method to use is |
Beta Was this translation helpful? Give feedback.
Ah, in this case, I would recommend creating your own input field and converting between the Unix epoch and the ISO 8601 time (which looks like
2024-02-14T08:33:28.8829+00:00
). You can then change the milliseconds, and when saving, convert the ISO 8601 time back to the database representation (e.g.1707899608.8829
).Example functions that can convert between the two: