Lines Matching refs:dateobj

2222 	php_date_obj     *dateobj;  in date_object_get_properties()  local
2225 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in date_object_get_properties()
2229 if (!dateobj->time) { in date_object_get_properties()
2235 ZVAL_STRING(zv, date_format("Y-m-d H:i:s.u", 14, dateobj->time, 1), 0); in date_object_get_properties()
2239 if (dateobj->time->is_localtime) { in date_object_get_properties()
2241 ZVAL_LONG(zv, dateobj->time->zone_type); in date_object_get_properties()
2245 switch (dateobj->time->zone_type) { in date_object_get_properties()
2247 ZVAL_STRING(zv, dateobj->time->tz_info->name, 1); in date_object_get_properties()
2251 timelib_sll utc_offset = dateobj->time->z; in date_object_get_properties()
2262 ZVAL_STRING(zv, dateobj->time->tz_abbr, 1); in date_object_get_properties()
2567 PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, c… in php_date_initialize() argument
2576 if (dateobj->time) { in php_date_initialize()
2577 timelib_time_dtor(dateobj->time); in php_date_initialize()
2580dateobj->time = timelib_parse_from_format(format, time_str_len ? time_str : "", time_str_len ? tim… in php_date_initialize()
2582dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", time_str_len ? time_str_len : s… in php_date_initialize()
2595 timelib_time_dtor(dateobj->time); in php_date_initialize()
2596 dateobj->time = 0; in php_date_initialize()
2618 } else if (dateobj->time->tz_info) { in php_date_initialize()
2619 tzi = dateobj->time->tz_info; in php_date_initialize()
2641 timelib_fill_holes(dateobj->time, now, TIMELIB_NO_CLONE); in php_date_initialize()
2642 timelib_update_ts(dateobj->time, tzi); in php_date_initialize()
2643 timelib_update_from_sse(dateobj->time); in php_date_initialize()
2645 dateobj->time->have_relative = 0; in php_date_initialize()
2808 static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht TSRMLS_DC) in php_date_initialize_from_hash() argument
2827 …ret = php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, … in php_date_initialize_from_hash()
2847 …ret = php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSR… in php_date_initialize_from_hash()
2862 php_date_obj *dateobj; in PHP_METHOD() local
2873 dateobj = (php_date_obj *) zend_object_store_get_object(return_value TSRMLS_CC); in PHP_METHOD()
2874 if (!php_date_initialize_from_hash(&dateobj, myht TSRMLS_CC)) { in PHP_METHOD()
2884 php_date_obj *dateobj; in PHP_METHOD() local
2895 dateobj = (php_date_obj *) zend_object_store_get_object(return_value TSRMLS_CC); in PHP_METHOD()
2896 if (!php_date_initialize_from_hash(&dateobj, myht TSRMLS_CC)) { in PHP_METHOD()
2907 php_date_obj *dateobj; in PHP_METHOD() local
2910 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in PHP_METHOD()
2914 if (!php_date_initialize_from_hash(&dateobj, myht TSRMLS_CC)) { in PHP_METHOD()
3076 php_date_obj *dateobj; in PHP_FUNCTION() local
3083 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in PHP_FUNCTION()
3084 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in PHP_FUNCTION()
3085 RETURN_STRING(date_format(format, format_len, dateobj->time, dateobj->time->is_localtime), 0); in PHP_FUNCTION()
3091 php_date_obj *dateobj; in php_date_modify() local
3095 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in php_date_modify()
3097 if (!(dateobj->time)) { in php_date_modify()
3114 memcpy(&dateobj->time->relative, &tmp_time->relative, sizeof(struct timelib_rel_time)); in php_date_modify()
3115 dateobj->time->have_relative = tmp_time->have_relative; in php_date_modify()
3116 dateobj->time->sse_uptodate = 0; in php_date_modify()
3119 dateobj->time->y = tmp_time->y; in php_date_modify()
3122 dateobj->time->m = tmp_time->m; in php_date_modify()
3125 dateobj->time->d = tmp_time->d; in php_date_modify()
3129 dateobj->time->h = tmp_time->h; in php_date_modify()
3131 dateobj->time->i = tmp_time->i; in php_date_modify()
3133 dateobj->time->s = tmp_time->s; in php_date_modify()
3135 dateobj->time->s = 0; in php_date_modify()
3138 dateobj->time->i = 0; in php_date_modify()
3139 dateobj->time->s = 0; in php_date_modify()
3144 timelib_update_ts(dateobj->time, NULL); in php_date_modify()
3145 timelib_update_from_sse(dateobj->time); in php_date_modify()
3146 dateobj->time->have_relative = 0; in php_date_modify()
3147 memset(&dateobj->time->relative, 0, sizeof(dateobj->time->relative)); in php_date_modify()
3196 php_date_obj *dateobj; in php_date_add() local
3200 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in php_date_add()
3201 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in php_date_add()
3205 new_time = timelib_add(dateobj->time, intobj->diff); in php_date_add()
3206 timelib_time_dtor(dateobj->time); in php_date_add()
3207 dateobj->time = new_time; in php_date_add()
3246 php_date_obj *dateobj; in php_date_sub() local
3250 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in php_date_sub()
3251 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in php_date_sub()
3260 new_time = timelib_sub(dateobj->time, intobj->diff); in php_date_sub()
3261 timelib_time_dtor(dateobj->time); in php_date_sub()
3262 dateobj->time = new_time; in php_date_sub()
3325 php_date_obj *dateobj; in PHP_FUNCTION() local
3331 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in PHP_FUNCTION()
3332 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in PHP_FUNCTION()
3333 if (dateobj->time->is_localtime/* && dateobj->time->tz_info*/) { in PHP_FUNCTION()
3336 set_timezone_from_timelib_time(tzobj, dateobj->time); in PHP_FUNCTION()
3345 php_date_obj *dateobj; in php_date_timezone_set() local
3348 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in php_date_timezone_set()
3349 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in php_date_timezone_set()
3354 timelib_set_timezone_from_offset(dateobj->time, tzobj->tzi.utc_offset); in php_date_timezone_set()
3357 timelib_set_timezone_from_abbr(dateobj->time, tzobj->tzi.z); in php_date_timezone_set()
3360 timelib_set_timezone(dateobj->time, tzobj->tzi.tz); in php_date_timezone_set()
3363 timelib_unixtime2local(dateobj->time, dateobj->time->sse); in php_date_timezone_set()
3408 php_date_obj *dateobj; in PHP_FUNCTION() local
3414 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in PHP_FUNCTION()
3415 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in PHP_FUNCTION()
3416 if (dateobj->time->is_localtime/* && dateobj->time->tz_info*/) { in PHP_FUNCTION()
3417 switch (dateobj->time->zone_type) { in PHP_FUNCTION()
3419 offset = timelib_get_time_zone_info(dateobj->time->sse, dateobj->time->tz_info); in PHP_FUNCTION()
3424 RETVAL_LONG(dateobj->time->z * -60); in PHP_FUNCTION()
3427 RETVAL_LONG((dateobj->time->z - (60 * dateobj->time->dst)) * -60); in PHP_FUNCTION()
3439 php_date_obj *dateobj; in php_date_time_set() local
3441 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in php_date_time_set()
3442 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in php_date_time_set()
3443 dateobj->time->h = h; in php_date_time_set()
3444 dateobj->time->i = i; in php_date_time_set()
3445 dateobj->time->s = s; in php_date_time_set()
3446 timelib_update_ts(dateobj->time, NULL); in php_date_time_set()
3487 php_date_obj *dateobj; in php_date_date_set() local
3489 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in php_date_date_set()
3490 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in php_date_date_set()
3491 dateobj->time->y = y; in php_date_date_set()
3492 dateobj->time->m = m; in php_date_date_set()
3493 dateobj->time->d = d; in php_date_date_set()
3494 timelib_update_ts(dateobj->time, NULL); in php_date_date_set()
3535 php_date_obj *dateobj; in php_date_isodate_set() local
3537 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in php_date_isodate_set()
3538 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in php_date_isodate_set()
3539 dateobj->time->y = y; in php_date_isodate_set()
3540 dateobj->time->m = 1; in php_date_isodate_set()
3541 dateobj->time->d = 1; in php_date_isodate_set()
3542 memset(&dateobj->time->relative, 0, sizeof(dateobj->time->relative)); in php_date_isodate_set()
3543 dateobj->time->relative.d = timelib_daynr_from_weeknr(y, w, d); in php_date_isodate_set()
3544 dateobj->time->have_relative = 1; in php_date_isodate_set()
3546 timelib_update_ts(dateobj->time, NULL); in php_date_isodate_set()
3587 php_date_obj *dateobj; in php_date_timestamp_set() local
3589 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in php_date_timestamp_set()
3590 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in php_date_timestamp_set()
3591 timelib_unixtime2local(dateobj->time, (timelib_sll)timestamp); in php_date_timestamp_set()
3592 timelib_update_ts(dateobj->time, NULL); in php_date_timestamp_set()
3637 php_date_obj *dateobj; in PHP_FUNCTION() local
3644 dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); in PHP_FUNCTION()
3645 DATE_CHECK_INITIALIZED(dateobj->time, DateTime); in PHP_FUNCTION()
3646 timelib_update_ts(dateobj->time, NULL); in PHP_FUNCTION()
3648 timestamp = timelib_date_to_int(dateobj->time, &error); in PHP_FUNCTION()
3874 php_date_obj *dateobj; in PHP_FUNCTION() local
3882 dateobj = (php_date_obj *) zend_object_store_get_object(dateobject TSRMLS_CC); in PHP_FUNCTION()
3883 DATE_CHECK_INITIALIZED(dateobj->time, DateTimeInterface); in PHP_FUNCTION()
3887 offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tzi.tz); in PHP_FUNCTION()
4421 php_date_obj *dateobj; in PHP_METHOD() local
4468 dateobj = (php_date_obj *) zend_object_store_get_object(start TSRMLS_CC); in PHP_METHOD()
4470 memcpy(clone, dateobj->time, sizeof(timelib_time)); in PHP_METHOD()
4471 if (dateobj->time->tz_abbr) { in PHP_METHOD()
4472 clone->tz_abbr = strdup(dateobj->time->tz_abbr); in PHP_METHOD()
4474 if (dateobj->time->tz_info) { in PHP_METHOD()
4475 clone->tz_info = dateobj->time->tz_info; in PHP_METHOD()
4485 dateobj = (php_date_obj *) zend_object_store_get_object(end TSRMLS_CC); in PHP_METHOD()
4486 clone = timelib_time_clone(dateobj->time); in PHP_METHOD()
4509 php_date_obj *dateobj; in PHP_METHOD() local
4518 dateobj = (php_date_obj *)zend_object_store_get_object(return_value TSRMLS_CC); in PHP_METHOD()
4519 dateobj->time = timelib_time_ctor(); in PHP_METHOD()
4520 *dateobj->time = *dpobj->start; in PHP_METHOD()
4522 dateobj->time->tz_abbr = strdup(dpobj->start->tz_abbr); in PHP_METHOD()
4525 dateobj->time->tz_info = dpobj->start->tz_info; in PHP_METHOD()
4536 php_date_obj *dateobj; in PHP_METHOD() local
4549 dateobj = (php_date_obj *)zend_object_store_get_object(return_value TSRMLS_CC); in PHP_METHOD()
4550 dateobj->time = timelib_time_ctor(); in PHP_METHOD()
4551 *dateobj->time = *dpobj->end; in PHP_METHOD()
4553 dateobj->time->tz_abbr = strdup(dpobj->end->tz_abbr); in PHP_METHOD()
4556 dateobj->time->tz_info = dpobj->end->tz_info; in PHP_METHOD()