Date: 06/23/99
- Next message: Jim Winstead: "Re: [PHP-DEV] split() question"
- Previous message: Sascha Schumann: "Re: [PHP-DEV] [OT] cvs configuration"
- In reply to: Cole Tuininga: "[PHP-DEV] _php3_mktime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jun 22, Cole Tuininga wrote:
>
> I was taking a look at the new _php3_mktime code and had a question or
> two.
>
> a) The following code segment confuses me:
>
> if (gm)
> ta.tm_isdst = 0;
> else
> ta.tm_isdst = -1;
>
> if (arg_count > 6)
> ta.tm_isdst = arguments[6]->value.lval;
>
> This, to me, seems to say that if they don't specify the daylight
> savings time effect for the time stamp in question, that it will
> automatically assume they are in -1 mode? Instead, shouldn't we grab an
> actual timestamp at this point and let the system determine the isdst?
We are letting the system determine the isdst based on the timestamp
being passed to mktime(). This is what setting is_dst to -1 does.
The only change to this code in the "new" mktime() is the addition
of allowing the is_dst flag to be specified with another optional
parameter. We were always setting it to -1 before (or 0 when calling
gmmktime()).
> b) We're making the assumption that a negative value for tm_min and
> tm_hour are ok. Is this safe on all platforms? The only platform I
> currently have access to is Linux, and it does work there...
There have never been any bugs reported based on this behavior.
Jim
-- PHP Development Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jim Winstead: "Re: [PHP-DEV] split() question"
- Previous message: Sascha Schumann: "Re: [PHP-DEV] [OT] cvs configuration"
- In reply to: Cole Tuininga: "[PHP-DEV] _php3_mktime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

