Created
March 11, 2011 04:32
-
-
Save DGaffney/865453 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| where gmt is aliased as gmtime | |
| >> DateTime.now.to_time.gmt | |
| => Fri Mar 11 04:28:38 UTC 2011 #alright, this looks good | |
| >> Time.now.gmt | |
| => Fri Mar 11 04:28:45 UTC 2011 #alright, this looks good | |
| >> d = Dataset.last | |
| => #<Dataset @id=1 @scrape_type="track" @start_time=#<DateTime: 212166602837/86400,-7/24,2299161> @length=3400 @created_at=nil @updated_at=nil @scrape_finished=false @instance_id=nil @params="lol" @tweets_count=0 @users_count=0> | |
| >> d.start_time = Time.now.gmt #so this should be about "Fri Mar 11 04:29..." | |
| => Fri Mar 11 04:29:37 UTC 2011 | |
| >> d.save | |
| => true | |
| >> d.start_time.gmt | |
| => Fri Mar 11 04:29:37 UTC 2011 #this looks fine... | |
| >> Time.now.gmt | |
| => Fri Mar 11 04:30:05 UTC 2011 #and agrees | |
| >> Dataset.all.update(:start_time => Time.now.gmt) | |
| => true | |
| >> Dataset.last.start_time.gmt | |
| => Fri Mar 11 11:30:19 UTC 2011 #now its an issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment