[ENH]WorldTimeMorph (should now find your time zone!)

Karl Ramberg karl.ramberg at chello.se
Sat Aug 25 10:57:24 UTC 2001


 
Do you ever wonder what time it is in Australia when you
are in Sweden. Here is a primitive solution to that problem.
File in this change set. It will download a image of the world,
display it as a morph with vertical lines approximately at
every time zone and display the hour at each zone.

I made a hack to find gmt. I found that www.squeak.org at port 80
told gmt, so I changed around some stuff in 
SimpleClientSocket>>httpTestHost:port:url: and defined
SimpleClientSocket>>httpGetTime:port:url:
So now you can print :
SimpleClientSocket httpGetTime: 'www.squeak.org' port: 80 url: '/'
and get gmt :-) (if they don't change the setup at www.squeak.org)

I did not however find a way to tell daylight saving info...

Set this yourself in 
WorldTimeMorph class>>initialize
	...
		daylightSaving _ true."set this yourself"
	...

Oh, and to display the beast:
 Evaluate in a textpane:
 WorldTimeMorph initialize
 
Enjoy, 
	Karl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WorldTimeMorph.1.cs.gz
Type: application/octet-stream
Size: 1367 bytes
Desc: Unknown Document
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010825/b63c40a4/WorldTimeMorph.1.cs.obj


More information about the Squeak-dev mailing list