May 22, 2009

Drupal: Timezones and places

May 22, 2009 - Categories: drupal, geek

The Drupal date_timezone module (part of Date) lets you use city names instead of timezone offsets in order to select a timezone, and that picks up Daylight Savings Time rules in a reasonably good manner, too.

A long list of cities can be hard to work with, though. This list is equally long, but it’s organized by GMT offset, which people are also likely to know.

Index: date_api.module
--- date_api.module	(revision 2404)
+++ date_api.module	(working copy)
@@ -490,6 +490,14 @@
+      // Now reformat the zonenames so that they're of the form (GMT+0800) Asia/Manila
+      foreach ($zonenames as $name => $zone) {
+        $x = date_make_date('now', $name);
+        $list[$name] = '(GMT' . date_format($x, 'P') . ') ' . str_replace(' ', '_', $zone);
+      }
+      asort($list);
+      $zonenames = $list;
       if (!empty($zonenames)) {
         cache_set('date_timezone_identifiers_list', 'cache', serialize($zonenames));

There’s probably a much more efficient way to do this, but hey, it works.

Monthly review: April 2009

May 22, 2009 - Categories: monthly

Better late than never! =) Here’s what April 2009 was all about:

I thought about my typical day’s happiness, what makes me happy at work, what makes me happy in general, and happiness as a martial art.

Software development
I’ve been getting better at writing design documents. Our staging and deployment practices (particularly with my Drupal Makefile) are pretty good, too! Learned a lot from the previous phase of our Drupal project…

Virtual assistance
I found myself talking to more and more people about virtual assistance, so I wrote some tips for getting started with virtual assistance. Turns out transcription is awesome. Imagining more possibilities for talk management and talk information too! I shared some tips on building a team.

I had a great conversation with Isaac Ezer and Andrew Louis. I wrote a quarterly review and weekly reports (April 5 April 12 April 18 April 24). I drew a map of my financial network and thought about making ridiculous amounts of money. I enjoyed riding on my bicycle, working on wool skirts and learning piano pieces

From last month’s plans:

Plans for May:

Weekly review: Week ending May 22, 2009

May 22, 2009 - Categories: weekly

From last week:

I also:

Next week: