This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-zerotierone/ext/librethinkdbxx/test/upstream/times/shim.yaml
2017-11-02 07:05:11 -07:00

23 lines
865 B
YAML

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)