Garradin Plugins

Check-in [79d5867829]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Soucis de fuseaux horaire locaux
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 79d58678297a685848d9f03b3d719704c54016ee
User & Date: bohwaz 2020-05-17 22:30:34
Context
2020-05-20
00:39
Ajout plugin caisse en alpha check-in: c3c4a1252a user: bohwaz tags: trunk
2020-05-17
22:30
Soucis de fuseaux horaire locaux check-in: 79d5867829 user: bohwaz tags: trunk
2020-05-16
00:32
Correction bug dans les rĂ©cupĂ©rations de dispo check-in: 877f5de8ce user: bohwaz tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to reservations/lib/Reservations.php.

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

	public function listUpcomingSlots()
	{
		$slots = DB::getInstance()->get('SELECT *,
			(SELECT COUNT(*) FROM plugin_reservations_personnes prp WHERE creneau = a.id AND date(prp.date) = a.date) AS jauge
			FROM (
				SELECT id, heure, maximum,
				CASE WHEN repetition = 1 AND jour < date() THEN
					date(\'now\', strftime(\'weekday %w\', jour))
				ELSE
					jour
				END AS date
				FROM plugin_reservations_creneaux prc
				WHERE jour >= date() OR repetition = 1
				ORDER BY date, heure
			) AS a;');

		$date = null;
		$hour_now = date('Hi');
		$day_now = date('Y-m-d');








|
|




|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

	public function listUpcomingSlots()
	{
		$slots = DB::getInstance()->get('SELECT *,
			(SELECT COUNT(*) FROM plugin_reservations_personnes prp WHERE creneau = a.id AND date(prp.date) = a.date) AS jauge
			FROM (
				SELECT id, heure, maximum,
				CASE WHEN repetition = 1 AND jour < date(\'now\', \'localtime\') THEN
					date(\'now\', \'localtime\', strftime(\'weekday %w\', jour))
				ELSE
					jour
				END AS date
				FROM plugin_reservations_creneaux prc
				WHERE jour >= date(\'now\', \'localtime\') OR repetition = 1
				ORDER BY date, heure
			) AS a;');

		$date = null;
		$hour_now = date('Hi');
		$day_now = date('Y-m-d');