I have a variable foo that contains a time, lets say 4pm today, but the zone offset is wrong, i.e. it is in the wrong time zone. How do I change the time zone?
When
You can do:
DateTime.parse('Fri Jun 26 07:00:00 UTC 2009').change(offset: '-0400')
Which returns:
Fri, 26 Jun 2009 07:00:00 -0400