No description
Find a file
2010-12-18 22:09:16 +03:00
include tz_shift/3 added, underscores removed from timezones names. 2010-12-18 22:09:01 +03:00
src tz_shift/3 added, underscores removed from timezones names. 2010-12-18 22:09:01 +03:00
Makefile rebar added 2010-10-05 17:33:11 +04:00
README Merge branch 'master' of github.com:dmitryme/erlang-localtime 2010-12-18 22:09:16 +03:00
rebar rebar added 2010-10-05 17:33:11 +04:00

This library contains next public exported methods:

* utc_to_local(DateTime, Timezone) - converts UTC time to local according to specified Timezone
* local_to_utc(DateTime, Timezone) - converts local time to UTC
* local_to_local(DateTime, TimezoneFrom, TimezoneTo) - converts local time to local
* tz_name(DateTime, Timezone) - returns a timezone name (E.g. MSK, MSD, etc)
* tz_shift(DateTime, Timezone) - returns shift from local datetime to GMT
* tz_shift(DateTime, TimezoneFrom, TimezoneTo) - returns shift from local datetime to required timezone
Where
DateTime = {date(), time()}
TimeZone(To, From) = String(). E.g. “Europe/Moscow”, “America/NewYork”. Or abbreviations "MSK", "MSD", etc. Note:
abbreviation is just used to find appropriate timezone name. If you want to convert "MSK" -> "PDT", but source timezone
is not in daylight saving, it will be corrected by library and "MSK" -> "PST" conversion will be made.