[or-cvs] r16063: Set TZ=UTC environment variable in RelativeLink (this will b (in torbrowser/trunk: . src/RelativeLink)

sjm217 at seul.org sjm217 at seul.org
Fri Jul 18 19:01:26 UTC 2008


Author: sjm217
Date: 2008-07-18 15:01:25 -0400 (Fri, 18 Jul 2008)
New Revision: 16063

Modified:
   torbrowser/trunk/README
   torbrowser/trunk/src/RelativeLink/RelativeLink.c
Log:
Set TZ=UTC environment variable in RelativeLink (this will be set in Vidalia, but not yet)

Modified: torbrowser/trunk/README
===================================================================
--- torbrowser/trunk/README	2008-07-18 18:36:35 UTC (rev 16062)
+++ torbrowser/trunk/README	2008-07-18 19:01:25 UTC (rev 16063)
@@ -147,4 +147,5 @@
        Update Pidgin OTR plugin to 3.2
        Update Tor to 0.2.1.2-alpha
        Update Portable Firefox to xx
-       Update Torbutton to 1.2.0rc6
\ No newline at end of file
+       Update Torbutton to 1.2.0rc6
+       Set TZ=UTC environment variable in RelativeLink (needed by Torbutton)
\ No newline at end of file

Modified: torbrowser/trunk/src/RelativeLink/RelativeLink.c
===================================================================
--- torbrowser/trunk/src/RelativeLink/RelativeLink.c	2008-07-18 18:36:35 UTC (rev 16062)
+++ torbrowser/trunk/src/RelativeLink/RelativeLink.c	2008-07-18 19:01:25 UTC (rev 16063)
@@ -22,6 +22,9 @@
 // Put it in the proper place.
 //
 
+#define TZVAR TEXT("TZ")
+#define TZVAL TEXT("UTC")
+
 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 {
     STARTUPINFO si;
@@ -31,6 +34,14 @@
     si.cb = sizeof(si);
     ZeroMemory ( &pi, sizeof(pi) );
 
+    // Set TZ=UTC environment variable
+
+    if (! SetEnvironmentVariable(TZVAR, TZVAL)) 
+    {
+        MessageBox ( NULL, TEXT ("Unable to set TZ environment variable"), NULL, MB_OK);
+        return -1;
+    }
+
     TCHAR *ProgramToStart;
     ProgramToStart = TEXT ("App/vidalia.exe --datadir .\\Data\\Vidalia\\");
 



More information about the tor-commits mailing list