Skip to content

Instantly share code, notes, and snippets.

@jpemberthy
Created February 14, 2009 17:33
Show Gist options
  • Save jpemberthy/64417 to your computer and use it in GitHub Desktop.
Save jpemberthy/64417 to your computer and use it in GitHub Desktop.
>> server_time = Time.now
=> Sat Feb 14 17:44:48 +0000 2009
>> col_time #returns the current Colombian Time
=> Sat Feb 14 12:45:02 UTC 2009
>> col_time > server_time # It should be true!
=> false
# Colombia to Server Time
>> col_to_utc = TZInfo::Timezone.get('America/Bogota').local_to_utc(col_time)
=> Sat Feb 14 17:45:02 UTC 2009
>> col_to_utc > server_time #now It should be true!
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment