Skip to content

Instantly share code, notes, and snippets.

@Piyush-Chaudhary
Created December 16, 2022 08:25
Show Gist options
  • Save Piyush-Chaudhary/11b33788a8cd06659bb92dfa55484612 to your computer and use it in GitHub Desktop.
Save Piyush-Chaudhary/11b33788a8cd06659bb92dfa55484612 to your computer and use it in GitHub Desktop.
Write a function that parses following input and prints date in your local timezone:
input = "{\"time\":\"2022-06-17T05:52:39.787Z\"}"
parser(input) => "2022-06-17 07:54:13 +0200"
def local_time(t)
t.local
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment