dmitryme/erlang_localtime — pull request #8 by choptastic (2013-10-22 18:27:43+00:00)
Title: Add list_timezones/0, export adjust_datetime/2, and allow Timezone name as strings in localtime_dst:check

Hi!

Thank you for the erlang_localtime package. I use it to handle timezones along with date-and-time formatting in a package called [qdate](http://github.com/choptastic/qdate).

Anyway, I've been using it for a while relying on one of my own forks (not wanting to bother you with my specific changes), but I figured it's probably better to try to get it all together in one package rather than have lots of forks.

Anyway, here are a few changes I've been using, which have been squashed for easy merging.

Added a function list_timezones/0: This merely returns a list of all timezones by name, so the user doesn't have to include the header file in their code.

Export the adjust_datetime/2 function: It was easiest to simply export this function for use in qdate so that it can simply adjust by minutes rather than by TZ name, but retain your erlang_localtime logic @ https://github.com/choptastic/qdate/blob/master/src/qdate.erl#L340

Allow strings in localtime_dst:check, this just adds a wrapper function to allow localtime_dst:check to accept a string as the timezone name, look it up in the timezone database, and then recall itself with the found timezone.

Also, I added vim modelines to the heads so that tabs-to-spaces don't become an issue for vim users who might also wish to contribute.

Thanks again for the great tool!

-Jesse