Time zone and appointments

Home Forums WPLMS AddOns WPLMS Appointments Time zone and appointments

Viewing 15 posts - 1 through 15 (of 43 total)
  • Author
    Posts
  • #315568
    adriantudor78
    Participant
    Hello again, Please help me with solving the old issue with timezone and appointments module (1.6.1) I'm using: - php date.timezone=Europe/Bucharest - Wordpress language = Romanian - Wordpress timezone = Bucharest - WordPress date format = d.m.Y - WordPress time format = H:i e - Appointments Date Format = DD-MM-YYYY - Appointments Language = en-US - Appointments Time Format = HH:mm Z ( Timezone ) The facts: - the instructor has the PC set on EEST (UTC+3 hours) - he creates a schedule for 16-17 october, between 12:00-14:00 (his timezone), with 1h per slot The issues: 1. a student from Amsterdam for example (UTC+1 hour) will see in a wrong way the schedule and slots 2. it seems the slots are saved in a wrong way in the wplms_appointments table. For example the entire schedule (ID 1858) has the following data: > start_date: 1602784800000, which is 10/15/2020 18:00:00.000 (UTC) > end_date: 1602957540000, which is 10/17/2020 17:59:00.000 (UTC) The rest of the slots are also wrong in the database, from my point of view. 3. in order to avoid any misunderstanding, it may be very useful to display the time as Wordpress is doing (H:i e) and save everything in the database as UTC. Best regards, Adrian
    #315569
    adriantudor78
    Participant
    This reply has been marked as private.
    #315603
    MrVibe
    Keymaster
    The appointments is build as a javascript module and it picks up date and time which is set on the user's computer. You can test the same on your computer by changing your computer;s date and time. The implementation is correct :
    • All date and times are stored in UTC and then converted into localtime zones.by the javascript. This can involve change of a date as well.
    • So, Date STart and Date End is the local Date start and Date end , which is different in UTC time zone.
    • The Time saved is also in UTC which is means 3 o clock at your place would be different at UTC
    The implementation is correct and can be verified in the version 4 implementation which is more advanced and light weight version of Appointments. Try it here : demos.wplms.io/playground , login user/pwd : [email protected]
    #315654
    adriantudor78
    Participant
    Dear Mr. Vibe, Thank you for your quiqk answer, but it seems there is the same bug. It is ok that javascript picks up date and time which is set on the user’s computer, but I remain to the conclusion that the slots are wrong recorded in the database, from the moment when the instructor is saving the schedule and the slots. As I said, in my case, the schedule for 16-17 october, between 12:00-14:00 Romanian time has been saved as:
    start_date: 1602784800000, which is 10/15/2020 18:00:00.000 (UTC) - this is wrong, it should be 10/16/2020 10:00:00.000 (sixteen instead of fifteen AND ten instead of eighteen) end_date: 1602957540000, which is 10/17/2020 17:59:00.000 (UTC) - this is wrong too, it should be 10/17/2020 12:00:00.000 (twelve/eleven instead of seventeen AND what about 59?)
    Anyway, I did the same test on your testing environment and the result is the same: https://screencast-o-matic.com/watch/cY6nFAKlo5 (please ignore what I did between 4'30'' - 6'00'' - wrong URL) I made another test where the chaos is obvious: a schedule for 01-03 November, between 20:00-22:00 (Bucharest timezone), with 30min per slot. Look how it is seen by Amsterdam timezone: https://screencast-o-matic.com/watch/cY6nqXKly3 Please note that I don't want to make the update to 4 for the moment as I worked too much for the actual stable website. Many thanks in advance. BR, Adrian
    #315655
    adriantudor78
    Participant
    This reply has been marked as private.
    #316056
    adriantudor78
    Participant
    Hello, Do you have any answer for me? Best regards, Adrian
    #316311
    adriantudor78
    Participant
    :(
    #316616
    Diana
    Participant
    Okay, I will check according to your timezone which is Romanian and I can tell you only after checking your video Do ping me tomorrow
    #316772
    adriantudor78
    Participant
    Hi Diana, Do you have time to look at it? BR, Adrian
    #317136
    adriantudor78
    Participant
    Please give me a feedback
    #317439
    Diana
    Participant
    Yes, Issue Replicated. I will add a fix on your site on Monday So atleast you can work on your site Do ping me here
    #317683
    adriantudor78
    Participant
    This reply has been marked as private.
    #317964
    Diana
    Participant
    This reply has been marked as private.
    #317967
    adriantudor78
    Participant
    This reply has been marked as private.
    #318259
    Diana
    Participant
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 43 total)
  • The topic ‘Time zone and appointments’ is closed to new replies.