Home › Forums › WPLMS AddOns › WPLMS Appointments › Time zone and appointments
Tagged: appointments, timezone
- This topic has 42 replies, 3 voices, and was last updated 3 years, 11 months ago by MrVibe.
-
AuthorPosts
-
October 2, 2020 at 11:27 am #315568adriantudor78ParticipantHello 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, AdrianOctober 2, 2020 at 11:37 am #315569adriantudor78ParticipantThis reply has been marked as private.October 2, 2020 at 3:51 pm #315603MrVibeKeymasterThe 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
October 2, 2020 at 7:23 pm #315654adriantudor78ParticipantDear 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, AdrianOctober 2, 2020 at 7:23 pm #315655adriantudor78ParticipantThis reply has been marked as private.October 5, 2020 at 10:36 am #316056adriantudor78ParticipantHello, Do you have any answer for me? Best regards, AdrianOctober 6, 2020 at 10:03 am #316311adriantudor78Participant:(October 7, 2020 at 12:16 pm #316616DianaParticipantOkay, I will check according to your timezone which is Romanian and I can tell you only after checking your video Do ping me tomorrowOctober 8, 2020 at 5:08 am #316772adriantudor78ParticipantHi Diana, Do you have time to look at it? BR, AdrianOctober 9, 2020 at 7:11 am #317136adriantudor78ParticipantPlease give me a feedbackOctober 10, 2020 at 10:02 am #317439DianaParticipantYes, Issue Replicated. I will add a fix on your site on Monday So atleast you can work on your site Do ping me hereOctober 12, 2020 at 8:33 am #317683adriantudor78ParticipantThis reply has been marked as private.October 13, 2020 at 11:40 am #317964DianaParticipantThis reply has been marked as private.October 13, 2020 at 11:52 am #317967adriantudor78ParticipantThis reply has been marked as private.October 14, 2020 at 12:54 pm #318259DianaParticipantThis reply has been marked as private. -
AuthorPosts
- The topic ‘Time zone and appointments’ is closed to new replies.