bigbluebutton_rails
bigbluebutton_rails copied to clipboard
Increase the precision of some datetime attributes
Some of the dates returned by the web conference server are being stored in the database as a datetime
, even though they are returned as a timestamp (with 13 digits).
Some other dates are already being stored with a higher precision, as for example t.decimal :create_time, precision: 14, scale: 0
.
The following dates should also be stored as decimal to increase their precision:
-
BigbluebuttonRecording#start_time
-
BigbluebuttonRecording#end_time
-
BigbluebuttonMeeting#create_time
See #106.
Implemented in the branch v3-gem
, currently being tested with mconf/mconf-web@v3
.
One thing I noticed is that some values are being stored with 10 digits while others have 13. This is probably because Rails works with 10-digit numbers when using to_i
and Time.at()
, but the numbers returned by the API have 13 digits.
If all timestamps in the API have 13 digits, they should have 13 digits in the database as well. This needs to be reviewed and adapted somehow.