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"
-
-
Replying to @joelquen
Note: You should also never use the `:db` format. :)
1 reply 0 retweets 0 likes -
-
Replying to @joelquen
Also because you shouldn't be passing dates as strings to the database
1 reply 0 retweets 1 like -
Replying to @sgrif
Yup. And for other uses you probably really want ISO 8601.
1 reply 0 retweets 0 likes -
Replying to @joelquen
Nah clearly julian days since 2000-01-01 as a float is the way to go
1 reply 0 retweets 0 likes -
OSX actually uses this format to store time... A lot
1 reply 0 retweets 0 likes -
-
-
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)
2 replies 0 retweets 0 likes
If you aren't specifically storing a 32 bit integer as seconds, there's not much reason to use 1970-01-01 as your 0 point, it's pretty arbitrary either way
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.