CodeIgniter Forums

Full Version: Documentation update?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]BLymoth[/eluser]
I had a problem with the date helper. When using timezone_menu(), it returned the different zones like UP2 or UM1, and i couldn't figure out how to transform those values into GMT offsets. After asking on the forums and the IRC channel with no luck, i dug through the source code to find that there is an already built in function that does exactly what i need.
If this function was documented, it would have saved me a lot of time, so maybe an update to the user guide would be in order? recheck all helpers and libraries, and make sure all public functions are up to date?

El Forum

[eluser]Derek Allard[/eluser]
Thanks BLmoth. Which function was undocumented? Have you found any others? Let me know and I'll get right on fixing that up.

El Forum

[eluser]BLymoth[/eluser]
In the date helper, the last function mentioned in the user guide is timezone_menu() which generates a dropdown select populated with the different timezones, and the values are UM12, UTC, UP7, etc.

The function that is NOT documented in the same helper is timezones(), which takes the value of the dropdown select and returns a GMT offset, -12, 0, +7.

Did not find any other functions that were undocumented, but i wasn't exactly looking for them :-p

El Forum

[eluser]Derek Allard[/eluser]
OK, added. Thanks!

El Forum

[eluser]Aaron L.[/eluser]
If anyone else has a problem with converting a local time into a GMT value, see this wiki page: http://codeigniter.com/wiki/convert_to_gmt/. It's a simple fix that allows you to do it.

El Forum

[eluser]JOKERz[/eluser]
useful thanx for your info.