[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] timezone change



Jo Even Skarstein wrote:
> 
> > Under MiNT you can do the same: Set your real time clock
> >(RTC) in UTC and
> 
> Exactly, this is what causes problems under anything else but MiNT...
> 
> > use only recent software that uses the new API.  Last
> > Sunday the output of
> 
> So using the old API you'll always get UTC?
> 
> > What are the alternatives? Switch back to local time
> > altogether? This
> 
> OK, what I'm going to suggest now is so incredibly simple that someone else must have had the idea but discarded it because it can't work...
> 
> 1. Set the RTC to local time, MagiC and TOS is now happy.
> 2. Since MiNT knows which timezone we're in, calculate the UTC from localtime, and use UTC in the kernel.
> 
> In theory, this would result in correct (local) time with both the new and old API, TOS and MagiC is happy, and the kernel use UTC. So why doesn't it work?
> 
> DST is a problem though, unless MiNT corrects the RTC itself.
> 
> Jo Even Skarstein


hi,
     just to muddy up the matter.  I use the old MWC  shell MSH.PRG.
     It sets the RTC to local time, and internally knows about UTC.
     UT is a local fiction.  The real time your machine tells your
     filesystem is the real clock.    When in ROME....

     TOS and MAGIC wants RTC = LOCALTIME.   MINT internally knows
     UTC (thats nice)  but it must convert for TOS and not convert
     for MINIX and FS2.    This is a conceptual problem.   
     Since I use MSH it has a CST setting in its shell.   

     It is because I am in the central time zone in North America,
     that I can see that this is a problem in representation.

     Mint can keep lunar time for all I care,   as long as the RTC and
     my TOS file system get local time.  I dont care.    MWC has a 
     GMC time call and a localtime ( ANSI vers)  So I get time from
     MWC as a 32 bit (UNIX like value).    Then I have 8 or 9
conversions
     depending on what I need or require.    Mint seems to do this also.
     It is not clear how system calls are to clear up this question.

     Mint should set my tos fileystem dates and RTC.    MSH does.

     Hope this helps a little.

      josephus.

      PS I still need a place to get FALCON memory in the USA.

 

-- 
Joe Widows  --   972 783 8944
I go sailing in the summer and look at stars in the winter.
Everybody's ignorant-- just on different subjects. 
---- Will Rogers jr.----