Apps :: Looking for World Time Application



I'm looking for an application that displays the time in several locations - preferably analogue clocks that show the time in London, New York, Toyko, etc - that I can make into a mydsl extension.

So far, I've come across gworldtime but that requires gtk+2.0.

Does anybody know of a suitable application that uses gtk+1.2 or other base dsl libs? Could torsmo be used for this purpose?

It could be made very easily with murgaLua.
I just woke up, so I'm in no condition to do it or show how to do it at the moment, but it probably shouldn't take more than a few minutes to put something like that together.

Of course it would depend on whether or not you want it to actively retreive the time from a server (probably need additional software?), or just set an offset for each clock using your system time.

It'd take me more than a few minutes to put something together :)

There's already a timeserver script in dsl (somewhere), but in my case an offset from the local time would probably be best as my time zone (GMT+4) is not in the dsl subset of time zones.

More perl practice.  You could call something like this and display its output in torsmo:

Code Sample
#!/usr/bin/perl

# Useage : citytime.pl somecity

use strict;
use warnings;

my $URL = "http://www.timeanddate.com/worldclock/";

#================================

my $city = shift;
my $download = "/tmp/times.html";

if (!$city) {die "No city specified"};

print "Downloading time from $URL\n"; # legal

system("wget -O $download $URL &>/dev/null");

open(CONT, $download) or die("Could not open $download");

while (<CONT>){
if (/$city.+?(\d{1,2}\:\d+\d+ (AM|PM))/i) { print "$city $1\n"};
}


NB: there is a notice in the TimeAndDate html source saying that programs that download content "transparent to the user" are forbidden.  Hence the output informing of the download in the above.

But if there's any call for it, this could be adapted to pull time off some other page not having restrictions.

EDIT: added argument check.

Code Sample
$ /opt/citytime.pl tokyo
Downloading time from http://www.timeanddate.com/worldclock/
tokyo 12:30 AM


Impressive - and to have it in 24:00 format?

Next Page...
original here.