time

ReQL command: time

Command syntax

r.time(year, month, day[, hour, minute, second], timezone) → time

Description

Create a time object for a specific time.

A few restrictions exist on the arguments:

  • year is an integer between 1400 and 9,999.
  • month is an integer between 1 and 12.
  • day is an integer between 1 and 31.
  • hour is an integer.
  • minutes is an integer.
  • seconds is a double. Its value will be rounded to three decimal places (millisecond-precision).
  • timezone can be 'Z' (for UTC) or a string with the format ±[hh]:[mm].

Example: Update the birthdate of the user “John” to November 3rd, 1986 UTC.

r.table("user").get("John").update({"birthdate": r.time(1986, 11, 3, 'Z')}).run(conn)

Related commands

Get more help

Couldn't find what you were looking for?

© RethinkDB contributors
Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
https://rethinkdb.com/api/python/time/

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部