guild icon
Toit
#warning: Time.from_string renamed to Time.parse (solved)
Thread channel in help
kaxori
kaxori 09/07/2023 09:12 AM
Version: v1.11.2
SDK version: v2.0.0-alpha.99
Build date: 2023-09-06T05:08:05Z

src\helpers.toit:30:22: warning: Deprecated constructor 'Time.from-string'
if Time.now < (Time.from_string "2022-01-10T00:00:00Z"):

https://libs.toit.io/core/time/class-Time
from_string str/string -> Time
Parses the given str to construct a UTC time instance.
The str must be in RFC 3339 format, which is a subset of ISO 8601 format.
For example "2019-12-18T06:22:48Z".
Leap seconds are not supported, and lower case 't' and 'z' are not allowed.

What is correct now ?
bitphlipphar
bitphlipphar 09/07/2023 09:13 AM
Time.parse
kaxori
kaxori 09/07/2023 09:17 AM
changed to:
if Time.now < (Time.parse "2022-01-10T00:00:00Z"):
=> OK now, thank you :👍🏻:
👍1
5 messages in total