mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
fixed the issue that token expire time was one month ealier than the correct time
This commit is contained in:
parent
9f20f78816
commit
0827547cea
@ -2289,6 +2289,7 @@ sub service_connection {
|
||||
my ($tokenid, $exptime) = xCAT::xcatd->gettoken($req);
|
||||
my ($sec,$min,$hour,$mday,$mon,$year) = localtime($exptime);
|
||||
$year += 1900;
|
||||
$mon += 1;
|
||||
my $htime = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$resp = {data=>[{token => [{id => $tokenid, expire => $htime}]}]};
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user