# 400 erron when click add listing button with time zone enabled

**URL:** <https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280>\
**Category:** Bookings\
**Tags:** bookings\
**Created:** [September 21, 2024, 1:08am UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280 "2024-09-21T01:08:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ltb4847](https://community.hivepress.io/user_avatar/community.hivepress.io/ltb4847/32/10978_2.png) [@ltb4847](https://community.hivepress.io/u/ltb4847)\
**Post date:** [September 21, 2024, 1:08am UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/1 "2024-09-21T01:08:39Z")

</div>

Hello HivePress Support,

I am encountering an issue with the time zone setting on my WordPress site, which is using the HivePress template. Here are the details:

1. I have deactivated all plugins except for HivePress to ensure there are no conflicts.
2. I went to **HivePress \> Settings \> Bookings** and enabled the **Time Zone** option.
3. However, when I try to create a listing by clicking the “Add a Listing” button, I get a **400 error** from the server, stating that the **time zone** has not been set, even though it is already set for the user profile.
4. To bypass this issue, I have to go to the user profile, reselect the time zone, and save it. After doing this, I can successfully create a listing without any errors.
5. This workaround is inconvenient as I have to manually reset the time zone for the user each time I want to post a new listing.

Could you please assist me in resolving this? I would like to avoid having to update the time zone for each user before creating a new listing.  
It’s as if HivePress forgets the user’s time zone.

PS : i use Martinique timezone and i dont have cache

i show you the form data :

1. latitude:

2. longitude:

3. categories:

120

1. images:

(binary)

1. title:

test

1. price:

2

1. location:

marti

1. services:

57

1. opening\_hours[66ee19de12161][day]:

tuesday

1. opening\_hours[66ee19de12161][from]:

43200

1. opening\_hours[66ee19de12161][to]:

72000

1. opening\_hours[te4ub8me40b][day]:

wednesday

1. opening\_hours[te4ub8me40b][from]:

43200

1. opening\_hours[te4ub8me40b][to]:

72000

1. description:

iuttrtrtyufuyg

1. booking\_slot\_duration:

30  
and server response :

```auto
{
    "error": {
        "code": 400,
        "errors": {
            "required": {
                "message": "The 'Booking Time Zone' field is required."
            }
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 23, 2024, 1:28pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/4 "2024-09-23T13:28:10Z")

</div>

Hi,

Most likely, you have enabled the Manage availability per vendor feature in HivePress \> Settings \> Bookings, and if so, you need to fill in the time zone in the vendor settings first, then everything will work correctly. Also, make sure you have the latest version of Bookings 1.5.2.

​I hope this is helpful to you.

---

<div class="post-metadata">

**Author:** ![ltb4847](https://community.hivepress.io/user_avatar/community.hivepress.io/ltb4847/32/10978_2.png) [@ltb4847](https://community.hivepress.io/u/ltb4847)\
**Post date:** [September 23, 2024, 1:57pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/5 "2024-09-23T13:57:18Z")

</div>

as explained, I’ve already set the time zone in the vendor settings. ( 3)  
The problem is as follows:

If I create a new vendor on my site and immediately post a listing, the site asks me to configure the seller and requires me to select a time zone. Then, the site asks me to configure the listing, and everything works fine (for the first listing).

Now, if I log out and log back in with the same vendor and try to post a second listing (I go directly to the listing configuration page), I get a 400 error saying that the time zone is missing. When I check the vendor’s configuration, the time zone is correctly added, but I still have to click “save settings” again for the time zone to be considered, allowing me to post the listing.  
i can give you an access to my website and wordpress admin. Or give you a video wich show the problem.  
my bookings version is : 1.5.2

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 24, 2024, 5:28am UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/6 "2024-09-24T05:28:24Z")

</div>

Hi,

Yes, if you have the possibility, please send us a video of this issue, as we cannot reproduce it locally.

---

<div class="post-metadata">

**Author:** ![ltb4847](https://community.hivepress.io/user_avatar/community.hivepress.io/ltb4847/32/10978_2.png) [@ltb4847](https://community.hivepress.io/u/ltb4847)\
**Post date:** [September 24, 2024, 4:12pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/7 "2024-09-24T16:12:35Z")

</div>

> [@ltb4847](#):
>
> `The 'Booking Time Zone' field is required.`

i trying to send you the video with a youtube link

---

<div class="post-metadata">

**Author:** ![ltb4847](https://community.hivepress.io/user_avatar/community.hivepress.io/ltb4847/32/10978_2.png) [@ltb4847](https://community.hivepress.io/u/ltb4847)\
**Post date:** [September 24, 2024, 4:12pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/8 "2024-09-24T16:12:59Z")

</div>

You can see the video at this private link : [https://youtu.be/rlqRFGGepT4](https://youtu.be/rlqRFGGepT4)

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 25, 2024, 2:21pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/12 "2024-09-25T14:21:09Z")

</div>

Hi,

Please send temporary WP access to [support@hivepress.io](mailto:support@hivepress.io) with details for reproducing this issue, and we’ll check it (please send only the link, without login and password). You can create a temporary access link using this plugin [Temporary Login Without Password – WordPress plugin | WordPress.org](https://wordpress.org/plugins/temporary-login-without-password).

---

<div class="post-metadata">

**Author:** ![ltb4847](https://community.hivepress.io/user_avatar/community.hivepress.io/ltb4847/32/10978_2.png) [@ltb4847](https://community.hivepress.io/u/ltb4847)\
**Post date:** [September 25, 2024, 3:42pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/13 "2024-09-25T15:42:44Z")

</div>

I’ve sent you the email

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 26, 2024, 12:55pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/17 "2024-09-26T12:55:46Z")

</div>

Hi,

Thank you for the link. We have passed the information to the developer, and we need a little more time to check it out. Please make sure that the link you sent us is valid for at least 7 days.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [October 26, 2024, 12:55pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/18 "2024-10-26T12:55:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![ihor](https://community.hivepress.io/user_avatar/community.hivepress.io/ihor/32/5_2.png) [@ihor](https://community.hivepress.io/u/ihor)\
**Post date:** [December 6, 2024, 5:07pm UTC](https://community.hivepress.io/t/400-erron-when-click-add-listing-button-with-time-zone-enabled/12280/19 "2024-12-06T17:07:58Z")

</div>

Thanks for the detailed bug report, this issue occurs only with the combination of settings of per-vendor mode, time slots and time limitation to specific categories. Please use this code snippet as a temporary fix, we’ll also fix it in the next update so you don’t have to do anything after adding the snippet (you can add it to the child theme’s functions.php file or via the Code Snippets plugin):

```auto
add_action(
	'hivepress/v1/models/listing/create',
	function( $listing_id, $listing ) {
		$vendor = $listing->get_vendor();

		if ( $vendor ) {
			update_post_meta( $listing_id, 'hp_booking_timezone', $vendor->get_booking_timezone() );
		}
	},
	1000,
	2
);

```
