niphlod/w2p_timezone_plugin — pull request #2 by lucadealfaro (2014-08-23 17:56:47+00:00)
Title: value not repected when provided in display of timezone list

When 'value' is provided to the tz_nice_detector_widget, the value needs to be displayed, because it corresponds to the currently set value in the database.
Before this change, the content of 'value' was always disregarded, and the timezone that was shown as selected always corresponded to the currently autodetected one.
After this change, if the 'value' field contains a valid timezone, the timezone shown corresponds to the one in the 'value' field, so that the widget behaves like any other normal web2py widget.

This change corresponds, in a way, to having:
db.table.field.default = autodetected time zone
rather than
form.vars.field = autodetected time zone