Oops, forgot this information: - connector: mysql2 - database : mariadb 5.5.35
I don't know for the "oracle" mysql, but mariadb support up to the microseconds in the timestamp https://mariadb.com/kb/en/microseconds-in-mariadb/ On Tuesday, 3 June 2014 06:49:33 UTC+2, Jeremy Evans wrote: > > On Monday, June 2, 2014 8:08:36 AM UTC-7, Stéphane D'Alu wrote: >> >> I'm using the following: >> - datetime_class is Time >> - ruby 2.1.1 >> - Sequel 4.10.0 >> >> When inserting a time, the micro seconds part is not taken into account: >> DB[:log].insert(:timestamp => Time.at(1234,5678)) >> >> I've got: 1970-01-01 01:20:34.000000 >> > > What database are you using? Sequel will generally use fractional seconds > in timestamps if the database supports it: > > $ ruby21 bin/sequel mock://postgres -c 'puts(DB.literal > Time.at(1234,5678))' > '1969-12-31 16:20:34.005678-0800' > $ ruby21 bin/sequel mock://mysql -c 'puts(DB.literal Time.at(1234,5678))' > > '1969-12-31 16:20:34' > $ ruby21 bin/sequel mock://mssql -c 'puts(DB.literal Time.at(1234,5678))' > '1969-12-31T16:20:34.005' > > Thanks, > Jeremy > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
