Fang Talks

Fresh and fruity!

I mean seriously, someone’s got to keep track of all that wobbly time biz!

And sometimes that someone is me. It was inevitable, really. But I was a fool for not seeing it coming. And now I’m running around with my hair on fire, not sure if it’s been burning since three hours ago, or if it’ll start smoldering in two. Though it’s really awesome we’re wide awake while the other half of the world is sleeping soundly, it does come with its set of inconveniences. And yes, this once again relates to RSS feeds, because there isn’t much else I’ve been working with lately.

For some reason I only recently paid some real attention to the dates and times as they are being displayed in SSR2. Apparently it was about time I did, because it wasn’t displaying the time for my posts here correctly. Turns out my server runs on GMT time, which is the lovely +0 timezone. Great, but also kind of troublesome! For example, I’m posting this on exactly 11 PM local time, but because I’m in the +2 timezone (and have my blog configured that way), it’ll display as being posted on 9 PM.

What we want displayed are local times, so the user doesn’t have to add their own timezone difference to figure out when exactly something was posted. We already learned that all dates retrieved are in +0, so we just have to get the user’s timezone, add that difference to the item’s time, and display that. Easy, right? Well, it would be, except there’s no super convenient way to get the user’s timezone, so it’ll require some fancy wizardry and whoosh-wah to get that working.

Nothing I can’t do though, especially with infinite information at my fingertips.
~ Fang

Comments

  • 21/05/2014 (12:29 PM)

    Can’t you just get a user to input their timezone themselves? Isn’t that how most systems work?

    • 21/05/2014 (1:27 PM)

      I could, but what about convenience and It Just Werks™?

Post a comment

Your email will stay hidden, required field are marked with a *.

Experimental anti-spam. You only have to do this once. (Hint: it's "Fang")