[vz-users] Middleware-Abfrage 4-Wochen Intervall

application MGR applicationMGR at ecoCuyo.de
Thu Jan 21 19:15:29 CET 2016


Hallo Andreas,

na mir wäre es natürlich recht, nur will ich nichts verschlimmbessern, falls jemand das Feature genau so braucht.

Gibt es nachteilige Nebenwirkungen, die bedacht werden müssen?

Best Grüße
Armin

> Am 21.01.2016 um 13:14 schrieb Andreas Goetz <cpuidle at gmail.com>:
> 
> 2016-01-21 12:29 GMT+01:00 application MGR <applicationMGR at ecocuyo.de <mailto:applicationMGR at ecocuyo.de>>:
> Hallo @
> 
> mit folgender Abfrage mit Startdatum 20.12.15 00:00:00 und Enddatum 17.01.16 00:00:00:
> 
> http://<localhost>/middleware.php/data.json?from=1450566000000&to=1452985200000&group=week&%20uuid%5B%5D=xxxxxxxx-xxxx-xxxx-xxxx-695ed220d33d
> 
> erhalte ich folgende Antwort von der Middleware:
> 
> {"version":"0.3","data”:[
> 	{
> 		"tuples”:[
> 				[1451257185000,159.436,39831], 		-> 	27.12.15 23:59:45
> 				[1451602785000,155.903,22587],		->	31.12.15 23:59:45	
> 				[1451861985000,50.125,17280],		->	03.01.16 23:59:45
> 				[1452466785000,138.161,39864],		->	10.01.16 23:59:45
> 				[1452985230000,75.092,34016]		->	17.01.16 00:00:30
> 			],
> ...
> 	}
> ]}
> 
> Wer kann mir sagen, warum der 31.12. hier als tuple mit-ausgegeben wird? Hat der letzte Tag des Jahres eine besondere Bedeutung für die group=week?
> 
> Sehr gute Frage. Die Antwort liegt hier: https://github.com/volkszaehler/volkszaehler.org/blob/master/lib/Interpreter/SQL/MySQLOptimizer.php#L63 <https://github.com/volkszaehler/volkszaehler.org/blob/master/lib/Interpreter/SQL/MySQLOptimizer.php#L63>
> 
> Mittlerweile (?) gibts bei MySQL eine Funktion YEARWEEK() die das gewünschte Ergebnis bringen sollte.
> 
> 
> Viele Grüße
> Armin
> 
> Wollen wir das ändern?
> 
> Viele Grüße,
> Andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20160121/028e568d/attachment.html>


More information about the volkszaehler-users mailing list