Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Improve now & strftime docs, remove not-really-documented time:compare


Info

time:atom(), time:compare(), and  and time predicates have not yet been ported to the new pico engine.

...

Code Block
languagejavascript
themeConfluence
xTime = time:now()		# 2010-10-06T18:11:47Z
 
xTime = time:now({		# 2010-10-06T18:11:47Z
	"tz" : "America/Los_Angeles"
})

The default time zone is determined by the operating system running Node and is used if an invalid time zone is provided. The list of valid time zones is updated periodically — for example, version 0.35.0 of the core engine used IANA TZDB 2017b.

time:new()

time:new() - returns a new RFC 3339 datetime string from a string formatted as described in ISO8601 (v2000).

...

Valid format arguments to strftime follow the POSIX strftime conventions.


Note

The third argument below is not yet implemented.

time:strftime() takes an optional third argument that is used to specify the timezone of the resulting formatted string. This can be used, among other things, to simply convert the timezone by returning an ISO formatted datetime string. For example, the following function uses time:strftime() to convert an incoming datetime string to UTC:

...