diff options
Diffstat (limited to 'ext/librethinkdbxx/test/upstream/times/shim.yaml')
-rw-r--r-- | ext/librethinkdbxx/test/upstream/times/shim.yaml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/librethinkdbxx/test/upstream/times/shim.yaml b/ext/librethinkdbxx/test/upstream/times/shim.yaml new file mode 100644 index 00000000..3f6e5eaf --- /dev/null +++ b/ext/librethinkdbxx/test/upstream/times/shim.yaml @@ -0,0 +1,22 @@ +desc: Test the native shims. +tests: + - def: + cd: t = 1375147296.68 + js: t = 1375147296.68 * 1000 + + - rb: r(Time.at(t).getlocal('-07:00')).to_iso8601 + py: r.expr(datetime.fromtimestamp(t, PacificTimeZone())).to_iso8601() + js: r(new Date(t)).inTimezone("-07:00").toISO8601() + ot: ("2013-07-29T18:21:36.680-07:00") + - rb: r(Time.at(t).utc).to_iso8601 + py: r.expr(datetime.fromtimestamp(t, UTCTimeZone())).to_iso8601() + js: r(new Date(t)).toISO8601() + ot: ("2013-07-30T01:21:36.680+00:00") + - rb: r(Time.at(t)).to_epoch_time + py: r.expr(datetime.fromtimestamp(t, PacificTimeZone())).to_epoch_time() + js: r(new Date(t)).toEpochTime() + ot: (1375147296.68) + - rb: r(Time.at(t).utc).to_epoch_time + py: r.expr(datetime.fromtimestamp(t, UTCTimeZone())).to_epoch_time() + js: r(new Date(t)).toEpochTime() + ot: (1375147296.68) |