Page 1 of 1

World Time Errors

Posted: Thu Apr 08, 2021 11:13 pm
by AmateurExtra
This is the array:
$locations [] = array("Greenwich Mean Time UTC",51.47912,0.00,"UTC",'uk');
$locations [] = array("New York",40.7128,-74.0060,"America/New_York",'us');
$locations [] = array("Los Angeles",34.0522,118.2437,"America/Los_Angeles",'us');
$locations [] = array("Honolulu",21.3069,157.8583,"Pacific/Honolulu",'us');
$locations [] = array("Tokyo",35.68,139.68,"Asia/Tokyo",'jp');
$locations [] = array("Sydney",-33.86,151.20,"Australia/Sydney",'au');
$locations [] = array("Johannesburg",-33.92,18.42,"Africa/Johannesburg",'za');
I have settings set to digital and to the 24 hour clock. The time shows digital but AM PM for the main section and the drop down shows 24 hour time. Also, Los Angeles is showing sunrise at 14:45 and sunset at 03:32. Honolulu shows sunrise at 09:15 and sunset at 21:45. Is the array in error of is it the php file? Please advise. This is the link to my page:
https://k3csg.altervista.org/template/indexDesktop.php

Re: World Time Errors

Posted: Fri Apr 09, 2021 8:05 am
by davidefa
I think Los Angeles and Honolulu longitudes should be negative ( as is the New York one )

Re: World Time Errors

Posted: Fri Apr 09, 2021 12:37 pm
by AmateurExtra
Thanks, making the LA and Honolulu longitude negative resolved that issue - operator error.

The remaining issue is why does the main clock show AM PM when I have selected a 24 hour clock?

Re: World Time Errors

Posted: Sat Apr 10, 2021 11:21 pm
by AmateurExtra
AmateurExtra wrote: Fri Apr 09, 2021 12:37 pm Thanks, making the LA and Honolulu longitude negative resolved that issue - operator error.

The remaining issue is why does the main clock show AM PM when I have selected a 24 hour clock?
worldTime-1.jpg
worldTime-1.jpg (46.57 KiB) Viewed 5564 times
As can be seen: sunrise, sunset, time of day and length of night is OK and in 24 hour format. The current time at the various locations is not in 24 hour format and I have the settings.php to $AMPM = false;
$clockStyle = 'digital';. I have tried to look at the code to determine what might be amiss and have had no luck. Please advise, thank you.

Re: World Time Errors

Posted: Sun Apr 11, 2021 3:04 pm
by davidefa
You can try this mod.

The funny thing is that I can see your page in 24h format ( but obviously you can't )
The arcane is that the visualization is 'locale dependant' ( and even browser dependant )
My locale (it-IT) shows it in 24h format, but your locale (en-US) shows it in 12h format!
The mod should fix this.

Re: World Time Errors

Posted: Sun Apr 11, 2021 3:41 pm
by AmateurExtra
davidefa wrote: Sun Apr 11, 2021 3:04 pm You can try this mod.

The funny thing is that I can see your page in 24h format ( but obviously you can't )
The arcane is that the visualization is 'locale dependant' ( and even browser dependant )
My locale (it-IT) shows it in 24h format, but your locale (en-US) shows it in 12h format!
The mod should fix this.
Now that sir, resolved the issue. I thank you for resolving this for me.

Christopher