Okay
  Public Ticket #2824841
Time Zones
Closed

Comments

  • Gerardo Camorlinga started the conversation

    Hello,

    In what time zone does Amelia save the appointment/event time? 

    Currently I have the setting to allow customers to view booking times in their time zone activated. That is all good. The website has it's time zone set to America/New_York, so supposedly if a customer is in America/Chicago (one hour less than New_York) and books an appointment at 4:00pm Chicago time, then in the database the appointment time will be saved as 5:00pm New york time correct?

    The reason I ask is because (in the above example) on the customer's front end view of their schedule, the booking time for their appointments appear in their time zone correctly, but in the wp_amelia_appointments table the bookingStart is different from what the user booked.

    I'll add some screenshots to try to clarify.

  • [deleted] replied

    Hi Gerardo,

    thank you for reachign out to ussmile.png

    It will save for you in New York time; however, the customer will see it still as Chicago time - this will allow both of you to arrive to the appointment at time (your own time).

    It's saved there as 6:30 because it's for the customer in Chicago time. You can try it out by selecting another time zone, and making a test appointment yourself - it will appropriately show there as their time.

    Also, in Amelia > Appointments, which time does it show (in the backend when you enter as admin)? It should be 7:30 New York time.

  • Gerardo Camorlinga replied

    Thanks for replying,

    Politely speaking, I do not think you are reading the times I sent you correctly. 

    In the database screenshot, there are three appointments for day 2021--7-24:
    06:30 (which is 6:30AM)
    22:30 (which is 10:30PM)
    23:30 (which is 11:30PM).

    On the customer front end view of the schedule you can see that for July 24, the same customer as above has the following appointment:
    6:30PM Chicago Time.

    As you can see the appointment time on the front end customer panel does not coincide with any of the appointment times in the database for that customer and date.

    Why is this?

  • Gerardo Camorlinga replied

    Here is a screenshot of the appointment in Amelia->Appointments. It shows the appointment set for 7:30pm(New York), which is correct.

    1954139752.png


  • [deleted] replied

    Hi Gerardo,

    thank you for the kind replysmile.png

    As you can see, time in Amelia > Appointments is 7:30 New York time.

    On the customer panel frontend it's 6:30 Chicago time.

    This is also correct.

    The time in the database table is shown as booked, there could only be a change made by your hosting regarding the time zone of the server, but this does not influence yours or customer's view; he sees it as 6:30 from Chicago, you see it as 7:30 from New York.

  • Gerardo Camorlinga replied

    Hello and thanks for the reply,

    It is correct that I can see it correctly on the front end, but my original question is how is the date/time stored in the database? In what timezone is it stored in the database? It is not being stored in New_York time which is the timezone setting for the wordpress site. I need to do some queries from the wp_amelia_customer_bookings table and want to convert the times to the correct time for a custom view I am making.

  •  2,572
    Aleksandar replied

    Hello Gerardo

    Ivana is out of the office today, so I'll help you out.

    Most databases use UTC for storing times, but this varies from hosting provider to hosting provider. UTC+0 is the default setting, but in order to know what your default database timezone is, you'll need to reach out to your hosting provider.

    Amelia has no affect on this as it doesn't have any timezone settings.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables