> -----Original Message----- > From: Vicki Brown [mailto:vlb@cfcl.com] > Sent: Thursday, February 25, 1999 6:28 PM > To: Walter Torres > Subject: [MacPerl-Toolbox] RE: [MacPerl] Q on Toolbox access from Perl > > > At 21:07 -0600 2/24/99, Walter Torres wrote: > > My Mac died some time ago. > > > > My office makes me use NT. > > Our collective sympathy to you. Thank you, thank you. But I have the last laugh! I have: - a functioning Apple Menu Bar across the top of my monitor. ( The "Start Bar" is hidden ) - The "recycle Bin" Is in the lower right corner - The Main Drive is in upper right - The Floppy is under that - The CD is under that - MS IE 4 is hidden - Network Neighborhood is hidden - The fonts are in Geneva Overall, it looks like a Mac, right down to the sounds it makes! :) The NT always wanted to be a Mac, so now it "feels" better. It drives the folks at the office crazy! > > I am creating a few scripts and I want them to be able to run on UNIX, > > Win32 and Mac, thus my posts of late. > > > > On the Mac, the Time Control Panel lets you set the Time Zone > > you are in. > > Well, no, actually, it lets you pick a city in your time zone and then it > does some appropriate stuff (probably GMT offsets) under the covers. I > don't think it's actually doing _Time Zone_ stuff. Yep. I just went and looked at my kids 630. Time offset, "city in Time Zone", but no Zone Name. :( > We had a big discussion about Time Zones in Sept 98 months back > (I instigated it :-) Cool. <snip> > Looking back through the discussion at that time, the upshot was > 1) There is no Toolbox call - the Mac doesn't do "time zones" mmm, oh well. > 2) you can calculate offset from GMT (in hours, so Pacific > Coast of USA is -8000) but to actually handle _time zones_ > requires a lookup table (and a very carefully crafted lookup > table at that). Yes, very carefully! I have the official table. It isn't pretty! > Many Unix systems have these (in /etc/zoneinfo > and the current timezone is stored in the $TZ environment > variable). The UNIX I have access to use... - US/Eastern Standard Time - American/Eastern Standard Time one or the other. > 3) The only person who really cared was me :-) In the words of Luke Skywalker: "I care." > > Do you happen to know what Toolbox call is needed to access > > that info, and if there is a corresponding Perl MODule to > > access that info? > > The question is, do you want the time offset in relation to GMT (which you > can calculate) or do you want the time zone (which is hard) or do you just > want access to the "Cities vs. offset" table that the Mac uses in the Map > control panel? Yes, well, that's it isn't it. > (p.s. Is there a reason you keep capitalizing the first three > letters of Module? :-) So I can get questions like this! ;) Anyway, the upshot is that we can not get the Zone Name from the Mac itself. Which means if we want the name, we have to use a lookup list. I have a few: the official list, a more concise list (from Time::Zone from CPAN) and one other from someone else. I was hoping to get around the lookup list. I think I have a method, but it is not automatic. I will know more in a few days. I will share it with you if you like. Thanks for the review and the info. Walter PS: How can I join the Toolbox list?