Fixed a localtime bug.
This commit is contained in:
parent
016de5abae
commit
4e800d5178
5 changed files with 9 additions and 8 deletions
|
|
@ -484,14 +484,14 @@ Returns an array of time elements. The elements are: years, months, days, hours,
|
|||
|
||||
=item epoch
|
||||
|
||||
The number of seconds since January 1, 1970.
|
||||
The number of seconds since January 1, 1970. Defaults to now.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub localtime {
|
||||
return Date::Calc::Localtime($_[0]);
|
||||
return Date::Calc::Localtime($_[0]||WebGUI::DateTime::time());
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ sub addUsersToGroups {
|
|||
my ($isIn) = WebGUI::SQL->quickArray("select count(*) from groupings where groupId=$gid and userId=$uid");
|
||||
unless ($isIn) {
|
||||
WebGUI::SQL->write("insert into groupings (groupId,userId,expireDate)
|
||||
values ($gid, $uid, ".(time()+$expireOffset).")");
|
||||
values ($gid, $uid, ".(WebGUI::DateTime::time()+$expireOffset).")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue