}
} ;
-HELP: >local
-{ $values { "timestamp" timestamp } }
-{ $description "Converts the " { $snippet "timestamp" } " to the timezone of your computer." }
+HELP: >local-time
+{ $values { "timestamp" timestamp } { "timestamp'" timestamp } }
+{ $description "Converts the " { $snippet "timestamp" } " to the timezone of your computer, returning a new " { $link timestamp } " instance." }
{ $examples
{ $example "USING: accessors calendar kernel prettyprint ;"
- "now now-gmt >local [ gmt-offset>> ] same? ."
+ "now now-gmt >local-time [ gmt-offset>> ] same? ."
"t"
}
} ;
HELP: >gmt
-{ $values { "timestamp" timestamp } }
-{ $description "Converts the " { $snippet "timestamp" } " to the GMT timezone." }
+{ $values { "timestamp" timestamp } { "timestamp'" timestamp } }
+{ $description "Converts the " { $snippet "timestamp" } " to the GMT timezone, returning a new " { $link timestamp } " instance." }
{ $examples
{ $example "USING: accessors calendar kernel prettyprint ;"
"now >gmt gmt-offset>> hour>> ."
}
} ;
-HELP: local
+HELP: local-time
{ $values { "timestamp" timestamp } }
{ $description "Set the time zone to the computer's local timezone." }
-{ $notes "The time is not converted, if you want that then call " { $link >local } "." } ;
+{ $notes "The time is not converted, if you want that then call " { $link >local-time } "." } ;
HELP: gmt
{ $values { "timestamp" timestamp } }
{ $description "Set the time zone to GMT." }
{ $notes "The time is not converted, if you want that then call " { $link >gmt } "." } ;
-{ local >local gmt >gmt convert-timezone } related-words
+{ local-time >local-time convert-local-time gmt >gmt convert-gmt utc >utc convert-utc convert-timezone } related-words
HELP: duration*
{ $values { "obj1" object } { "obj2" object } { "obj3" object } }
}
"Time zones:"
{ $subsections
- >local
+ >local-time
>gmt
+ >utc
convert-timezone
}
"Timestamps relative to each other:"