--- countdown.c 2009-08-16 06:16:51.000000000 +1200 +++ countdown.c.new 2010-11-04 13:37:35.000000000 +1300 @@ -12,6 +12,7 @@ #include "prefs.h" #include "pluginpref.h" #include "gtkplugin.h" +#include "debug.h" static gboolean set_status(gpointer data); void reset_timeout(); @@ -22,7 +23,6 @@ static gboolean plugin_load(PurplePlugin *plugin) { - static int handle; thisplugin = plugin; timeout = 0; @@ -160,7 +160,6 @@ static gboolean set_status(gpointer data) { - PurplePlugin* plugin = (PurplePlugin*) data; PurpleSavedStatus* status; struct tm target; @@ -179,9 +178,18 @@ int until = purple_prefs_get_bool("/plugins/gtk/countdown/until"); if(utc == TRUE) { - target_time = timegm(&target); + gchar *tz; + tz = getenv("TZ"); + g_setenv("TZ", "", 1); + tzset(); + target_time = mktime(&target); + if (tz) + g_setenv("TZ", tz, 1); + else + g_unsetenv("TZ"); + tzset(); } else { - target_time = timelocal(&target); + target_time = mktime(&target); } if (until) {