2 LuCI http protocol implementation - date helper class.
4 This class contains functions to parse, compare and format http dates.
6 module "luci.http.protocol.date"
9 Return the time offset in seconds between the UTC and given time zone.
13 @param tz Symbolic or numeric timezone specifier
14 @return Time offset to UTC in seconds
18 Parse given HTTP date string and convert it to unix epoch time.
22 @param data String containing the date
23 @return Unix epoch time
27 Convert the given unix epoch time to valid HTTP date string.
31 @param time Unix epoch time
32 @return String containing the formatted date
36 Compare two dates which can either be unix epoch times or HTTP date strings.
40 @param d1 The first date or epoch time to compare
41 @param d2 The first date or epoch time to compare
42 @return -1 - if d1 is lower then d2
43 @return 0 - if both dates are equal
44 @return 1 - if d1 is higher then d2