LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Chris Nandor Date: Tue May 6 07:46:43 2003 Subject: [MacPerl-Toolbox] Re: Timezone information
At 22:46 +1000 2003.05.06, Rick Measham wrote: >Sorry Chris, I didn't explain myself too well. I'm looking for the name >of the zone. It seems to be stored in the resource fork of 'Date & Time >Preferences' (possibly ID256 of the 'pref' resources), but it's not in >plain text. Maybe its an offset. Any ideas? Is it anywhere useful, or do >I have to work out how this preferences file is encoded? I don't see that data in the pref resources, any of them. But it may work for you. Here's some code to get the resource data. #!perl use File::Spec::Functions; use Mac::Files; use Mac::Memory; use Mac::Resources; my $file = catfile( FindFolder(kOnSystemDisk, kPreferencesFolderType), 'Date & Time Preferences' ); my $rsfile = FSpOpenResFile($file, 0); my $rsrc = GetResource('pref', 256); print $rsrc->get; CloseResFile($rsfile); -- Chris Nandor pudge@pobox.com http://pudge.net/ Open Source Development Network pudge@osdn.com http://osdn.com/
| Navigate in group perl.macperl.toolbox at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |