From 0787077b389a53c9566fbe2f57f3812054a226f1 Mon Sep 17 00:00:00 2001 From: Dmitry Melnikov Date: Wed, 23 Jan 2013 19:00:32 +0400 Subject: [PATCH] Update README.md --- README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 39aa61f..f1b29f4 100644 --- a/README.md +++ b/README.md @@ -14,23 +14,22 @@ is not in daylight saving, it will be corrected by library and "MSK" -> "PST" co #### Examples of usage -Convert UTC time to local one - +Converts UTC time to local one >localtime:utc_to_local({{2010, 7, 22}, {17, 56, 23}, "Europe/Moscow"). > >{{2010,10,10},{21,56,23}} -Convert local time to UTC one +Converts local time to UTC one >localtime:local_to_utc({{2010, 10, 10}, {21, 56, 23}}, "Europe/Moscow"). > >{{2010,10,10},{17,56,23}} -Convert time from one local timezone to another local one +Converts time from one local timezone to another local one >localtime:local_to_local({{2010, 10, 10}, {21, 56, 23}}, "Europe/Moscow", "Australia/Sydney"). > >{{2010,10,11},{3,56,23}} -Return timezone name +Returns timezone name >localtime:tz_name({{2010, 10, 10}, {21, 56, 23}}, "Europe/Moscow"). > >{"MSK","MSK"} @@ -38,3 +37,17 @@ Return timezone name >localtime:tz_name({{2010,10,11},{3,56,23}}, "Australia/Sydney"). > >{"EST","EST"} + +Calculates time difference between UTC and local one +>localtime:tz_shift({{2013, 01, 22}, {18, 17, 00}}, "Europe/Moscow"). +> +>{'+',4,0} + +>localtime:tz_shift({{2013, 01, 22}, {18, 17, 00}}, "America/New York"). +> +>{'-',5,0} + +Calculates time difference between two local timezones +>localtime:tz_shift({{2013, 01, 22}, {18, 17, 00}}, "America/New York", "Europe/Moscow"). +> +>{'+',9,0}