There seem to be no *simple* and *free* world clocks for Mac OS X. The ones I've found are over 2MB downloads (some up to 6MB!!!). Jeez. All I want is a simple window at the bottom of my screen showing the time in the UK now.
Maybe time to dig up my Cocoa programming book.
Re:GeekTool
Matts on 2005-01-11T23:00:33
Ah, that's fantastic. I'm now running:Thanks for that!$ cat ~/London_Time.pl
#!/usr/bin/perl -w
my @parts = localtime(time + (3600 * 5));
printf "London: %02d:%02d\n", $parts[2], $parts[1];Re:GeekTool
vsergu on 2005-01-12T15:22:57
You'll be off for a week in late March / early April.Re:GeekTool
Matts on 2005-01-12T17:45:21
Yeah I was aware of that. The alternative is to use something complex like DateTime.pm to get it right, but I don't need to get that complex really, and I don't want the overhead of loading DateTime.pm and all its friends for this little scriptlet (though I could use pperl to get around that).Re:GeekTool
grantm on 2005-01-21T07:28:11
The alternative is to use something complex like DateTime.pm... or something simple like
... $ENV{TZ} = 'BST';
my @parts = localtime(time + (3600 * 5));
printf "London: %02d:%02d\n", $parts[2], $parts[1];Re:GeekTool
grantm on 2005-01-21T09:11:10
Sorry, engage brain before cutting and pasting. This is what I meant:
$ENV{TZ} = 'BST';
my @parts = localtime;
printf "London: %02d:%02d\n", $parts[2], $parts[1];or
use POSIX;
$ENV{TZ} = "BST";
print strftime "London: %H:%M\n", localtime;