Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timezonelist is truncating some timezone names in system_general.php #242

Closed
cbasolutions opened this issue Jul 6, 2015 · 9 comments
Closed
Assignees
Labels
bug Production bug
Milestone

Comments

@cbasolutions
Copy link
Contributor

$timezonelist = array_map(
function ($path) { return str_replace('/usr/share/zoneinfo/', '', $path); },
glob('/usr/share/zoneinfo/*/*')
);

This truncates several values and allows for erroneous selections in the drop down. Is there a reason to use this instead of the built-in PHP function: DateTimeZone::listIdentifiers()

The list:

America/Argentina/Buenos_Aires
America/Argentina/Catamarca
America/Argentina/Cordoba
America/Argentina/Jujuy
America/Argentina/La_Rioja
America/Argentina/Mendoza
America/Argentina/Rio_Gallegos
America/Argentina/Salta
America/Argentina/San_Juan
America/Argentina/San_Luis
America/Argentina/Tucuman
America/Argentina/Ushuaia
America/Indiana/Indianapolis
America/Indiana/Knox
America/Indiana/Marengo
America/Indiana/Petersburg
America/Indiana/Tell_City
America/Indiana/Vevay
America/Indiana/Vincennes
America/Indiana/Winamac
America/Kentucky/Louisville
America/Kentucky/Monticello
America/North_Dakota/Beulah
America/North_Dakota/Center
America/North_Dakota/New_Salem

@fichtner fichtner added the bug Production bug label Jul 6, 2015
@fichtner fichtner added this to the 16.1 milestone Jul 6, 2015
@fichtner
Copy link
Member

fichtner commented Jul 6, 2015

Nice catch. No particular reason I guess. It went through a refactor, but it can go through one more... Will push a small cleanup that will make this easier to fix in one place only.

@fichtner fichtner self-assigned this Jul 6, 2015
fichtner added a commit that referenced this issue Jul 6, 2015
Show all valid paths, but not 'UTC' as it doesn't exist literally.
@fichtner
Copy link
Member

fichtner commented Jul 6, 2015

The Etc\UTC style time zones are gone, but since the dialog asks for locations I think this is ok?

@fichtner
Copy link
Member

fichtner commented Jul 6, 2015

A bit more on the history. zoneinfo.tgz used to be in /usr/share instead of the proper layout. I refactored that, not having looked up if there was a portable function already available.

0d8ad1b487c44

@cbasolutions
Copy link
Contributor Author

Is there a way for me to easily pull this onto my device for testing?

@fichtner
Copy link
Member

fichtner commented Jul 7, 2015

http://lastsummer.de/development-workflow-in-opnsense/

These days I use "core_safe" instead of "core" so that auto-mount doesn't kick in automatically. Don't forget to "make umount" when you are done.

fichtner added a commit that referenced this issue Jul 8, 2015
Show all valid paths, but not 'UTC' as it doesn't exist literally.
@fichtner
Copy link
Member

fichtner commented Jul 8, 2015

Confident about these changes; will be in today's 15.7.1

@fichtner
Copy link
Member

Any thoughts on this issue's resolution? :)

@cbasolutions
Copy link
Contributor Author

Hi Franco, I can confirm on my firewall that the TZ selection I was looking for is now there and it is writing to /conf/config.xml. I also added a phpinfo() to the bottom of index.php and it is now showing the proper TZ!

This seems to be resolved.

@fichtner
Copy link
Member

Yay, thanks for confirming.

On 10.07.2015, at 14:19, cbasolutions notifications@github.com wrote:

Hi Franco, I can confirm on my firewall that the TZ selection I was looking for is now there and it is writing to /conf/config.xml. I also added a phpinfo() to the bottom of index.php and it is now showing the proper TZ!

This seems to be resolved.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

2 participants