MISC

internet time resources
This shockwave code comes from:
Ian Clay

-- link--

This code is for Macromedia Shockwave.  Thanks goes to Ian Clay for releasing this code.

put this perl script onto your website

#----cut between here

#!/usr/bin/perl
# Returns the UTC in seconds since midnight. (MacPerl returns local system
time)

# coded by Manuel Hermann, 1998
$getdate = "/bin/date";
$date = `$getdate +"%T"`;
print "Content-type: text/html\n\n";
print $date;

#---cut to here

and this into your shockwave,

--to see this working go to "http://www.100percent.org" written by Ian Clay,
Trees Ltd

global gswatch
score script
on exitframe
if the timer > 60 * 20 then
set here = "http://www.yoursite.com/getUTC.pl?" -- download the getUTC.pl
from
gswatch = getnettext(here)
starttimer
end if

and a movie script
global gswatch
on idle
gtime = (netTextResult(gswatch))
if gtime <> "" then
set the itemdelimiter to ":"
set ghour = item 1 of gswatch
set gmin = item 2 of gswatch
mymin = (myhour * 60 ) + mymin
gswatch = string(integer(mymin / 1.44))
if the number of chars of gswatch = 1 then
set gswatch = "00"&gswatch
end if

if the number of chars of gswatch = 2 then
set gswatch = "0"&gswatch
end if

set the text of field "swatch" to string("Internet time: @"&gswatch)
end if

end


main     news     about      documents      message board      directory     resources


Posted 13 Jan 99
@846

© 1999 Ryan J. Thiessen (mail)
This page is not affiliated with Swatch® AG (www.swatch.com)