mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
- Simplify code a little.
This commit is contained in:
parent
a81ac8d04b
commit
65530de209
@ -202,11 +202,8 @@ static timelib_sll do_adjust_timezone(timelib_time *tz, timelib_tzinfo *tzi)
|
||||
break;
|
||||
|
||||
case TIMELIB_ZONETYPE_ID:
|
||||
tz->is_localtime = 1;
|
||||
timelib_set_timezone(tz, tz->tz_info);
|
||||
return -tz->z;
|
||||
|
||||
break;
|
||||
tzi = tz->tz_info;
|
||||
/* Break intentionally missing */
|
||||
|
||||
default:
|
||||
/* No timezone in struct, fallback to reference if possible */
|
||||
|
@ -132,6 +132,7 @@ void timelib_unixtime2local(timelib_time *tm, timelib_sll ts, timelib_tzinfo* tz
|
||||
|
||||
gmt_offset = timelib_get_time_zone_info(ts, tz);
|
||||
timelib_unixtime2gmt(tm, ts + gmt_offset->offset);
|
||||
|
||||
/* we need to reset the sse here as unixtime2gmt modifies it */
|
||||
tm->sse = ts;
|
||||
tm->dst = gmt_offset->is_dst;
|
||||
|
Loading…
Reference in New Issue
Block a user