@@ -304,6 +304,9 @@ function bboxFromParams(service: ServiceType, version: string, crsAuthId: CRS_ID
304
304
default :
305
305
throw new Error ( 'Unsupported CRS - bbox could not be parsed' ) ;
306
306
}
307
+ // SH services support switched min & max X/Y, but we don't:
308
+ [ minX , maxX ] = [ Math . min ( minX , maxX ) , Math . max ( minX , maxX ) ] ;
309
+ [ minY , maxY ] = [ Math . min ( minY , maxY ) , Math . max ( minY , maxY ) ] ;
307
310
return new BBox ( crs , minX , minY , maxX , maxY ) ;
308
311
}
309
312
@@ -337,15 +340,15 @@ function timeFromParams(params: any): Date[] {
337
340
fromTime = new Date ( timeParts [ 0 ] ) ;
338
341
toTime = new Date ( timeParts [ 1 ] ) ;
339
342
if ( ! isTimeSpecifiedInDate ( timeParts [ 1 ] ) ) {
340
- toTime . setHours ( 23 , 59 , 59 , 999 ) ;
343
+ toTime . setUTCHours ( 23 , 59 , 59 , 999 ) ;
341
344
}
342
345
} else if ( timeParts . length === 1 ) {
343
346
// "When a single time is specified the service will return data from beginning of
344
347
// satellite mission until the specified time"
345
348
fromTime = new Date ( '1970-01-01' ) ;
346
349
toTime = new Date ( timeParts [ 0 ] ) ;
347
350
if ( ! isTimeSpecifiedInDate ( timeParts [ 0 ] ) ) {
348
- toTime . setHours ( 23 , 59 , 59 , 999 ) ;
351
+ toTime . setUTCHours ( 23 , 59 , 59 , 999 ) ;
349
352
}
350
353
}
351
354
0 commit comments