aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface
diff options
context:
space:
mode:
authorMartin Cox <[email protected]>2017-04-05 22:26:55 +0100
committerMartin Cox <[email protected]>2017-04-05 22:26:55 +0100
commitffd6bb83f541091d169a0fa556f4c6d307b9b043 (patch)
tree2cfdf2bca4fa4756b1ae51efb25da48b390e3302 /lib/erl_interface
parenta1100c46c2ca2121d723edc03cb7885e3014af7c (diff)
downloadotp-ffd6bb83f541091d169a0fa556f4c6d307b9b043.tar.gz
otp-ffd6bb83f541091d169a0fa556f4c6d307b9b043.tar.bz2
otp-ffd6bb83f541091d169a0fa556f4c6d307b9b043.zip
When a non-DST time is passed to the httpd_util:rfc1123_date/1 function, it
causes a case-clause error, as the calender:local_time_to_universal_time_dst/1 can return an empty list, which is not currently handled. When called with an invalid DST time: 1> httpd_util:rfc1123_date({{2017, 03, 26},{1, 0, 0}}). ** exception error: no case clause matching [] in function httpd_util:rfc1123_date/1 (httpd_util.erl, line 334) To alleviate this, simply add a clause to handle the empty list and return the original time in the expected rfc1123 format. This is the approach of other modules which make use of the calender:local_time_to_universal_time_dst/1 function. The formatted date is then returned without error: 2> httpd_util:rfc1123_date({{2017, 03, 26},{1, 0, 0}}). "Sun, 26 Mar 2017 01:00:00 GMT"
Diffstat (limited to 'lib/erl_interface')
0 files changed, 0 insertions, 0 deletions