aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/test/pkey_test.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2010-06-07 13:01:36 +0000
committerErlang/OTP <[email protected]>2010-06-07 15:37:41 +0200
commita474f5b2c85c80e1b97df731d973e66faf76cec5 (patch)
tree69db8f4d7ada2da3402bdeb1d60994eafad00bb1 /lib/public_key/test/pkey_test.erl
parent23fbb26b04921f98c78c600506fa754914f76af2 (diff)
downloadotp-a474f5b2c85c80e1b97df731d973e66faf76cec5.tar.gz
otp-a474f5b2c85c80e1b97df731d973e66faf76cec5.tar.bz2
otp-a474f5b2c85c80e1b97df731d973e66faf76cec5.zip
Public key test fixes
Diffstat (limited to 'lib/public_key/test/pkey_test.erl')
-rw-r--r--lib/public_key/test/pkey_test.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/public_key/test/pkey_test.erl b/lib/public_key/test/pkey_test.erl
index 9d596eee4f..4cf20f0174 100644
--- a/lib/public_key/test/pkey_test.erl
+++ b/lib/public_key/test/pkey_test.erl
@@ -271,7 +271,7 @@ publickey(#'DSAPrivateKey'{p=P, q=Q, g=G, y=Y}) ->
#'OTPSubjectPublicKeyInfo'{algorithm = Algo, subjectPublicKey = Y}.
validity(Opts) ->
- DefFrom0 = date(),
+ DefFrom0 = calendar:gregorian_days_to_date(calendar:date_to_gregorian_days(date())-1),
DefTo0 = calendar:gregorian_days_to_date(calendar:date_to_gregorian_days(date())+7),
{DefFrom, DefTo} = proplists:get_value(validity, Opts, {DefFrom0, DefTo0}),
Format = fun({Y,M,D}) -> lists:flatten(io_lib:format("~w~2..0w~2..0w000000Z",[Y,M,D])) end,