Re: [AD] `timezone'

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, Jul 01, 2000 at 06:29:12PM +0100, George Foot wrote:
> DJGPP just defines ALLEGRO_NO_TIMEZONE, causing it to use an
> alternative method, but I don't think the alternative is very
> portable either -- it's a bit Unixy.  As far as I can see,
> there's a much simpler way to implement these things, anyway --
> call `mktime' then `gmtime'.  Could you try doing this?  Take
> out the entire #ifdef ALLEGRO_NO_TIMEZONE...#else...#endif
> block, in `tools/datedit.c', and replace it with:
> 
>     {
>         time_t tm = mktime (&t);
>         if (tm != -1) {
>             struct tm *temp = gmtime (&tm);
>             if (temp) memcpy (&t, temp, sizeof t);
>         }
>     }
> 
> I wrote that off the top of my head, but I think it's right.
> Just check it compiles with Borland -- it should, because the
> functions are all ANSI.  Can anyone see any problems with this
> solution?  e.g. does it adjust the time in the right direction?
> If it's OK, I think we should forget about the `timezone'
> variable and not use `gettimeofday' for this either.

I wrote this some time ago regarding the timezone problem, and
nobody seemed to say either that it looks OK or that there's a
problem with it.  Please say if you think this is wrong (or if
you think it's right).  If nobody says it's wrong, I'll put it
into CVS; the timezone problem affects a variety of platforms,
and it will be good to see the back of it. :)

Regarding the new WIP, I originally said I'd do it but now
I've been on holiday in Greece for several weeks, so I'm
really out of touch with things.  I think we should try to
release a new WIP very soon, because it's been many months since
3.9.32 came out -- the idea of WIPs is that they come out
frequently!  If we do get back into that habit, it won't matter
much if something is left out of this release.

Since I'm so out of touch with the recent developments, it might
be better if someone else makes the WIP.  Alternatively, if
everyone says it's OK to go ahead, I can still do it, but I'm
not in much of a position to judge myself whether we're ready or
not.  Ideally, it should work on all the platforms, and I think
it will be great if the native Mingw32 build works too.

George

-- 
Random project update:
22/06/2000: AllegroGL alpha 8 released at http://allegrogl.sourceforge.net/
        Improved Windows support.  New directory structure.
        Fixed OpenGL coding mistake in `tex.c'.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/