Skip to content

Instantly share code, notes, and snippets.

@mikz
Created September 10, 2010 17:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mikz/574015 to your computer and use it in GitHub Desktop.
Save mikz/574015 to your computer and use it in GitHub Desktop.
def quoted_date(value)
if value.acts_like?(:time) && value.respond_to?(:usec)
begin
"#{value.getutc.to_s(:db)}.#{sprintf("%06d", value.usec)} #{value.formatted_offset}"
rescue
"#{super}.#{sprintf("%06d", value.usec)}"
end
else
super
end
end
@sunaku
Copy link

sunaku commented Sep 15, 2010

I don't understand. AccessKey for what? The link to the original patch I posted?

By the way, here is my final revision to your (this) gist: http://gist.github.com/574080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment