| DEFAULT_SERVER | = | Server.new("LiveJournal.com", "http://www.livejournal.com") |
| HAVE_XML_PARSER | = | true |
| HAVE_XML_PARSER | = | false |
LiveJournal times have no time zone, as they are for display only: "I wrote this post at midnight". However, it’s convenient to represent times with a Ruby time object. But when time zones get involved, everything gets confused; we’d like to store a Unix time in the database and those only make sense as GMT. To reduce confusion, then, we imagine all LiveJournal times are in GMT. This function takes a time in any time zone and just switches the timezone to GMT. That is, coerce_gmt of 11:12pm PST is 11:12 pm GMT. The entry time-setting functions require this GMT part to verify you’re thinking carefully about time when you use Entry#time. If I want an entry that has a time that corresponds to what I feel is "now", I’d use
LiveJournal::coerce_gmt Time.now