File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 352
352
function getSolarTime ( date , lng ) {
353
353
// Approximation: every degree of longitude corresponds to 4 minutes.
354
354
const offsetMinutes = lng * 4 ;
355
- const solarDate = new Date ( date . getTime ( ) + offsetMinutes * 60000 ) ;
355
+ const solarDate = new Date (
356
+ date . getTime ( ) + offsetMinutes * 60000 ,
357
+ ) ;
356
358
return solarDate . toLocaleTimeString ( "en-US" , {
357
359
hour : "2-digit" ,
358
360
minute : "2-digit" ,
419
421
// Append a line for Solar Time using the marker's longitude
420
422
const solarTimeLine = `<div class="time-entry">
421
423
<div class="timezone-name">Solar Time</div>
422
- <div class="time-value">${ getSolarTime ( now , roundedLng ) } </div>
424
+ <div class="time-value">${
425
+ getSolarTime ( now , roundedLng )
426
+ } </div>
423
427
</div>` ;
424
428
timeDiv . innerHTML = timeStrings . join ( "" ) + solarTimeLine ;
425
429
} ;
You can’t perform that action at this time.
0 commit comments