Changeset 3641661
- Timestamp:
- 08/11/2026 09:55:22 AM (3 months ago)
- Location:
- easypeasy-booking/trunk
- Files:
-
- 4 edited
-
CHANGELOG.md (modified) (1 diff)
-
assets/js/opening-hours.js (modified) (1 diff)
-
easypeasy-booking.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easypeasy-booking/trunk/CHANGELOG.md
r3638139 r3641661 5 5 User-facing entries also live in `readme.txt` (WordPress.org requires that 6 6 format); this file is the developer-facing mirror with more technical detail. 7 8 ## [1.2.1] — 2026-07-24 9 10 ### Fixed 11 - `[epbk_hours]` badge could read "Open now" after actual closing time. 12 `opening-hours.js`'s `siteNow()` mixed the visitor's own 13 `Date.prototype.getTimezoneOffset()` into a calculation that already only 14 needed the site's UTC offset — `Date.now()` is a plain UTC instant, 15 independent of the visitor's local clock, so adding the visitor's offset 16 on top was both unnecessary and wrong whenever it didn't happen to cancel 17 out against the site's own offset. Now: `new Date(Date.now() + 18 offsetMinutes * 60000)`, read back with the UTC getters. 7 19 8 20 ## [1.2.0] — 2026-07-24 -
easypeasy-booking/trunk/assets/js/opening-hours.js
r3638139 r3641661 18 18 19 19 // Compute "now" in the *site's* timezone regardless of the visitor's 20 // browser timezone, using the UTC-offset trick: build a Date whose 21 // UTC-getters read back the site's local wall-clock time. 20 // browser timezone. Date.now() is already a plain UTC instant (it does 21 // not depend on the visitor's local clock/timezone at all), so adding 22 // the site's UTC offset and reading it back with the UTC-getters gives 23 // the site's true wall-clock time directly — no need to touch the 24 // visitor's own getTimezoneOffset() anywhere in this calculation. 22 25 function siteNow(offsetMinutes) { 23 var utcMs = Date.now() + new Date().getTimezoneOffset() * 60000; 24 return new Date(utcMs + offsetMinutes * 60000); 26 return new Date(Date.now() + offsetMinutes * 60000); 25 27 } 26 28 -
easypeasy-booking/trunk/easypeasy-booking.php
r3638139 r3641661 4 4 * Plugin URI: https://easypeasybooking.irish/ 5 5 * Description: A simple, commission-free booking and appointments system for service businesses. Works with or without WooCommerce. 6 * Version: 1.2. 06 * Version: 1.2.1 7 7 * Author: EasyPeasy Booking 8 8 * License: GPL v2 or later … … 22 22 23 23 // Plugin constants. 24 define('EPBK_VERSION', '1.2. 0');24 define('EPBK_VERSION', '1.2.1'); 25 25 define('EPBK_PLUGIN_FILE', __FILE__); 26 26 define('EPBK_PLUGIN_DIR', plugin_dir_path(__FILE__)); -
easypeasy-booking/trunk/readme.txt
r3638139 r3641661 6 6 Tested up to: 7.0 7 7 Requires PHP: 8.0 8 Stable tag: 1.2. 08 Stable tag: 1.2.1 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 86 86 == Changelog == 87 87 88 = 1.2.1 = 89 * Fixed: the [epbk_hours] live badge could show "Open now" past closing time. The client-side clock mixed in the visitor's own browser timezone offset alongside the site's, which only cancelled out correctly by coincidence — now computed from the site's timezone alone. 90 88 91 = 1.2.0 = 89 92 * Added a live opening hours widget: the `[epbk_hours]` shortcode and "EasyPeasy Booking — Opening Hours" block show an "Open now / Closed" badge (updates live in the visitor's browser) plus your weekly business hours table. … … 99 102 == Upgrade Notice == 100 103 104 = 1.2.1 = 105 Fixes the [epbk_hours] live badge sometimes showing "Open now" after closing time. 106 101 107 = 1.2.0 = 102 108 Adds a live opening hours widget ([epbk_hours] shortcode / Opening Hours block).
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)