Home › Forums › WPLMS AddOns › WPLMS Appointments › Time zone and appointments
Tagged: appointments, timezone
- This topic has 42 replies, 3 voices, and was last updated 4 years ago by MrVibe.
-
AuthorPosts
-
November 9, 2020 at 6:40 pm #323756DianaParticipantThis reply has been marked as private.November 10, 2020 at 2:51 pm #323938adriantudor78ParticipantDo you have any news for me?November 11, 2020 at 9:39 am #324105adriantudor78ParticipantPlese send me a feedback. There are more than 6 months I'm waiting for this to be solved.November 11, 2020 at 7:18 pm #324236DianaParticipantThis reply has been marked as private.November 12, 2020 at 12:43 pm #324353adriantudor78ParticipantThis reply has been marked as private.November 17, 2020 at 12:39 pm #325044adriantudor78ParticipantHello @diana, Did you have time to analyse this?
Dear @mr-vibe and @diana , As I said before I don’t want to migrate to v4 for the moment, as I worked too much and hard for the actual stable version of my website. At this moment I don’t want to start all over again. But, I think you can solve this issue very quickly, as you know very well your scripts. It’s not about the calendar. It seems it is a “-“ (minus) typing mistake in your script or something similar. That is where you INSERT the data INTO the wplms_appointments table. How do I deducted this? The main goal of the test: creating a Schedule from 1st January 2021 to 2nd January 2021, having the timeframe 07:00 AM – 09:00 AM, with 30 min. slots for a Student located in UTC Time. RESULTS 1. Instructor from UTC+2 (Bucharest) Front office 01 January 2021 @ 09:00 AM (UTC+2) 02 January 2021 @ 11:00 AM (UTC+2) Database start_date: 1609444800000 => 31 December 2020 @ 08:00 PM (UTC) end_date: 1609617540000 => 02 January 2021 @ 07:59 PM (UTC) Conclusion: 4 hours are missing for UTC+2, from both start_date and end_date (twice) https://screencast-o-matic.com/watch/cYXljUM58P 2. Instructor from UTC+1 (Amsterdam) Front office 01 January 2021 @ 08:00 AM (UTC+1) 02 January 2021 @ 10:00 AM (UTC+1) Database start_date: 1609452000000 => 31 December 2020 @ 10:00 PM (UTC) end_date: 1609624740000 => 02 January 2021 @ 09:59 PM (UTC) Conclusion: 2 hours are missing for UTC+1, from both start_date and end_date (twice) https://screencast-o-matic.com/watch/cYXljKM5R5 3. Instructor from UTC+5.5 (New Delhi) Front office 01 January 2021 @ 12:30 PM (UTC+5.5) 02 January 2021 @ 14:30 AM (UTC+5.5) Database start_date: 1609419600000 => 31 December 2020 @ 01:00 PM (UTC) end_date: 1609592340000 => 02 January 2021 @ 12:59 PM (UTC) Conclusion: 11 hours are missing for UTC+5.5, from both start_date and end_date (twice) https://screencast-o-matic.com/watch/cYXlQhMEc6 4. Instructor from UTC Front office 01 January 2021 @ 07:00 AM (UTC) 02 January 2021 @ 09:00 AM (UTC) Database start_date: 1609459200000 => 01 January 2021 @ 12:00 AM (UTC) end_date: 1609631940000 => 02 January 2021 @ 11:59 PM (UTC) PERFECT !!!!! Conclusion: 0 hours are missing for UTC+0 (twice as well) https://screencast-o-matic.com/watch/cYXljkM59t 5. Instructor from UTC-3.5 (Newfoundland) Front office 01 January 2021 @ 03:30 AM (UTC-3.5) 02 January 2021 @ 05:30 AM (UTC-3.5) Database start_date: 1609484400000 => 01 January 2021 @ 7:00 AM (UTC) end_date: 1609657140000 => 03 January 2021 @ 06:59 AM (UTC) Conclusion: 7 hours are ADDED for UTC+5.5, in both start_date and end_date (twice more) https://screencast-o-matic.com/watch/cYXl6sMEDx 6. Instructor from UTC-8 (Pacific Time) Front office 31 December 2020 @ 23:00 AM (UTC-8) 02 January 2021 @ 01:00 AM (UTC-8) Database start_date: 1609430400000 => 31 December 2020 @ 04:00 PM (UTC)* end_date: 1609516740000 => 03 January 2021 @ 03:59 PM (UTC) Conclusion: 16 hours are ADDED for UTC+8, in both start_date and end_date (twice more) * The start_date is correct to be 31 December, as long as the start_time for the first slot is 1860 (=31 h). 31 Dec @ 00:00 + 31H = 01 Jan @ 07:00 https://screencast-o-matic.com/watch/cYXlXqMEYG PS: in all scenarios I tested, both columns start_time and end_time seem to be good PS2: please help me with other 2 issues I have, but I received no answer from you yet: https://wplms.io/support/forums/topic/eventon-button-missing/ https://wplms.io/support/forums/topic/badges-are-awarded-even-if-they-are-disabled/ BR, Adrian
November 24, 2020 at 8:05 pm #326346adriantudor78ParticipantNothing here?????? Please help!!!! Tip no. 1 The "start_date" and "end_date" columns are wrong calculated in "wplms_appointments" table. That can be corrected in wp-content/plugins/wplms-appointments/includes/class.api.php: $a['date_start'] = $a['date_start']-$availability['timezone']2601000; $a['date_end'] = $a['date_end']-$availability['timezone']2601000; Tip no. 2 Why do you use "+6e4*F" in .js files? F=getTimezoneOffset() is a negative number. Therefore should be -6e4*F PS: Maybe that why you used wrong math like: $time = $appointment[0]['start_date']+60000$appointment[0]['start_time'] - $appointments_buffer_time60000 - 2*intval($post['timezoneoffset']); // subtract because we comare with date in current timezoneNovember 28, 2020 at 5:36 am #326959adriantudor78Participant@diana, Almost 2 months have been passed and no progress?November 28, 2020 at 5:42 am #326962DianaParticipantI am working according to what you shared above. And I think we can solve this but please give me 3 daysDecember 1, 2020 at 6:28 pm #327496adriantudor78ParticipantAny progress?December 5, 2020 at 9:50 am #328222DianaParticipantYes, I will add the fix today on your siteDecember 5, 2020 at 11:23 am #328240adriantudor78ParticipantWOW so big surprise :) Thanks!!!!December 6, 2020 at 12:49 am #328310MrVibeKeymasterWP appointments table stores all dates in GMT timezone. Now the Javascript getTimeZoneOffset gives out a number with the sign. So there is no need to reverse the sign. Checking with Diana about the fix -
AuthorPosts
- The topic ‘Time zone and appointments’ is closed to new replies.