Rails allows calling `to_s` with an optional format argument on dates. This can lead to cryptic "wrong number of args" errors when you end up calling something like `http://nil.to _s(:db)` Using the alias `to_formatted_s(:db)` leads to a much nicer "no method error"
-
-
Creating your own epoch is pretty common. PG stores time as a 64 bit integer representing microseconds since 01-01-2000 (also I was mistaken in my other tweet, OSX is since 2001)
-
If you're creating your own time format, epoch + counter is the most sane way to do it. Much nicer than trying to do some kind of human-readable thing.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.