}
return tzid;
}
+#elif defined(NETWARE)
+ /* Try to guess timezone from system information */
+ {
+ char *tzid = timelib_timezone_id_from_abbr("", ((_timezone * -1) + (daylightOffset * daylightOnOff)), daylightOnOff);
+ if (tzid) {
+ return tzid;
+ }
+ }
#endif
/* Fallback to UTC */
php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We had to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm");
PHP_FUNCTION(timezone_name_from_abbr)
{
char *abbr;
- char *tzname;
+ char *tzid;
int abbr_len;
long gmtoffset = -1;
long isdst = -1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &abbr, &abbr_len, &gmtoffset, &isdst) == FAILURE) {
RETURN_FALSE;
}
- tzname = timelib_timezone_id_from_abbr(abbr, gmtoffset, isdst);
+ tzid = timelib_timezone_id_from_abbr(abbr, gmtoffset, isdst);
- if (tzname) {
- RETURN_STRING(tzname, 1);
+ if (tzid) {
+ RETURN_STRING(tzid, 1);
} else {
RETURN_FALSE;
}