File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/Application/Controller Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,12 @@ var headerbar = function (url) {
200200 ) ;
201201
202202 $ ( '#navbar-first .opsup-form label, #navbar-first .opsup-name' ) . on ( 'click' , function ( e ) {
203- $ ( "#opsupwindow #opsup-content" ) . load ( url + 'opsups/opsups' , function ( ) {
203+ var day = '' ;
204+ if ( $ ( "#calendar:visible" ) . length > 0 ) {
205+ day = $ ( '#date' ) . val ( ) ;
206+ day = day . replace ( / \/ / g, "-" ) ;
207+ }
208+ $ ( "#opsupwindow #opsup-content" ) . load ( url + 'opsups/opsups' + ( day . length > 0 ? '?day=' + day : '' ) , function ( ) {
204209 $ ( "#opsupwindow" ) . modal ( 'show' ) ;
205210 } ) ;
206211 } ) ;
Original file line number Diff line number Diff line change @@ -80,8 +80,14 @@ public function opsupsAction() {
8080 $ qb = $ em ->createQueryBuilder ();
8181
8282 $ daystart = new \DateTime ($ day );
83+ $ offset = $ daystart ->getTimezone ()->getOffset ($ daystart );
84+ $ daystart ->setTimezone (new \DateTimeZone ('UTC ' ));
85+ $ daystart ->add (new \DateInterval ("PT " . $ offset . "S " ));
8386 $ daystart ->setTime (0 , 0 , 0 );
87+
8488 $ dayend = new \DateTime ($ day );
89+ $ dayend ->setTimezone (new \DateTimeZone ('UTC ' ));
90+ $ dayend ->add (new \DateInterval ("PT " . $ offset . "S " ));
8591 $ dayend ->setTime (23 , 59 , 59 );
8692
8793 $ qb ->select ('l ' )
You can’t perform that action at this time.
0 commit comments