fixed incorrect 'G' in the format parameter string

In the format parameter string, 'G' should have represented 24-hour format of an hour WITHOUT leading zeros.
But it actually results in 24-hour format of an hour WITH leading zeros.
This commit is contained in:
FlyingLu 2021-11-01 16:24:15 +08:00 committed by GitHub
parent ad559ae1f5
commit d34da1d107
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -522,7 +522,7 @@ format([$g|T], {_,{H,_,_}}=Dt, Acc) when H > 12 ->
format([$g|T], {_,{H,_,_}}=Dt, Acc) ->
format(T, Dt, [itol(H)|Acc]);
format([$G|T], {_,{H,_,_}}=Dt, Acc) ->
format(T, Dt, [pad2(H)|Acc]);
format(T, Dt, [itol(H)|Acc]);
format([$h|T], {_,{H,_,_}}=Dt, Acc) when H > 12 ->
format(T, Dt, [pad2(H-12)|Acc]);
format([$h|T], {_,{H,_,_}}=Dt, Acc) ->