On Tue, 20 Jan 2015, Joshua Rogers wrote:

> On 20/01/15 06:15, Joshua Rogers wrote:
> > --
> >  ext/date/lib/tm2unixtime.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> Somebody please take a look at /ext/date/lib/parse_tz.c too:
> 
> 438timelib_sll timelib_get_current_offset(timelib_time *t)
> [..]
> 446                        return (t->z + t->dst) * -60;
> Should that be cast timelib_sll too?
> 
> I think perhaps the function should be an int, seeing as it looks like
> the result should be negative. Somebody please check.

The result can be either positive or negative as t->z can be both. 
timelib_sll seems right though, as it stands for "long long signed".
I don't quite see how this can overflow though - as t->z and t->dst come 
just close to 100000 (and it's internal provided data).

cheers,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
Posted with an email client that doesn't mangle email: alpine

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to