Ruby datetimes: Difference between revisions

From wikinotes
(Created page with "{{ TODO | sort out what is activesupport extensions }} <source lang="ruby"> Time.parse("Wed Oct 11 13:49:06 2023 -0700") Date.parse("Wed Oct 11 13:49:06 2023 -0700") </source>")
 
No edit summary
 
Line 6: Line 6:
Time.parse("Wed Oct 11 13:49:06 2023 -0700")
Time.parse("Wed Oct 11 13:49:06 2023 -0700")
Date.parse("Wed Oct 11 13:49:06 2023 -0700")
Date.parse("Wed Oct 11 13:49:06 2023 -0700")
time.in_time_zone  # convert to UTC
</source>
</source>

Latest revision as of 14:51, 25 October 2023

TODO:

sort out what is activesupport extensions

Time.parse("Wed Oct 11 13:49:06 2023 -0700")
Date.parse("Wed Oct 11 13:49:06 2023 -0700")

time.in_time_zone  # convert to UTC