Skip to content

Instantly share code, notes, and snippets.

@meijeru
Created May 10, 2018 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meijeru/9371b91f8cf7f9a09e760db1de41dcae to your computer and use it in GitHub Desktop.
Save meijeru/9371b91f8cf7f9a09e760db1de41dcae to your computer and use it in GitHub Desktop.
to-local-time: func [
"adjusts a time given as UTC, or a date containing a time, to the local timezone"
d [time! date!]
][
either time? d
[
d + now/zone
][
if d/timezone [
d/timezone: now/zone
]
d
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment