Hi,
In the last hours I've been debugging and testing the new implementation of
the date related functions on windows.
I've found some little problems:
-
timelib_tz_lookup_table defines the gmtoffset as an int, but in the
fallback table there are some decimals numbers. So, either remove those
entries or change the struct to hold a float. This also applies to the
timelib_timezone_id_from_abbr() function, which receives a long, instead of
a float. -
in the guess_timezone() function, the offset maths are being truncated.
the explicit cast to float doesn't help either, because it happens before
reaching there. -
the fallback table isn't complete (and had an error). I've added a couple
more tzs. -
I've fixed the problem I've reported earlier with timezones that don't
have DST settings (or when the user disables DST in control panel).
A patch to fix 2, 3 and 4: http://mega.ist.utl.pt/~ncpl/php_win_date2.txt
Apart of these little issues, the new code is working perfectly!
Nuno
Hi,
In the last hours I've been debugging and testing the new implementation of
the date related functions on windows.
I've found some little problems:
timelib_tz_lookup_table defines the gmtoffset as an int, but in the
fallback table there are some decimals numbers. So, either remove those
entries or change the struct to hold a float. This also applies to the
timelib_timezone_id_from_abbr() function, which receives a long, instead of a
float.in the guess_timezone() function, the offset maths are being truncated. the
explicit cast to float doesn't help either, because it happens before reaching
there.the fallback table isn't complete (and had an error). I've added a couple
more tzs.I've fixed the problem I've reported earlier with timezones that don't have
DST settings (or when the user disables DST in control panel).A patch to fix 2, 3 and 4: http://mega.ist.utl.pt/~ncpl/php_win_date2.txt
I committed a slightly modified patch (you should not use any of the
US/* mappings f.e.). Thanks.
regards,
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
- timelib_tz_lookup_table defines the gmtoffset as an int, but in the
fallback table there are some decimals numbers. So, either remove those
entries or change the struct to hold a float. This also applies to the
timelib_timezone_id_from_abbr() function, which receives a long, instead
of a
float.I committed a slightly modified patch (you should not use any of the
US/* mappings f.e.). Thanks.regards,
Derick
OK, thanks!
And have you decided anything about 1)? May I help in anything? (personally
I think that using a float there is a bit overkill in memory usage..)
Nuno