hi Everyone,
Easy question, I would like to have Yesterday in timestamp.
This is example of Tomorrow.
my ( $Sec, $Min, $Hour, $Day, $Month, $Year ) = $Self->{TimeObject}->SystemTime2Date(
SystemTime => $Self->{TimeObject}->SystemTime() + 60 * 60* 24,
);
my $TimeStampTomorrow= "$Year-$Month-$Day 23:59:59";
Try with -3600 seconds, it doesn't work.
my ( $Sec, $Min, $Hour, $Day, $Month, $Year ) = $Self->{TimeObject}->SystemTime2Date(
SystemTime => $Self->{TimeObject}->SystemTime() - 3600,
);
my $TimeStampYesterday= "$Year-$Month-$Day 23:59:59";
Any idea ?
thanks
J-F
Try to find $TimeStampYesterday
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Try to find $TimeStampYesterday
You should subtract 86400 (its 60 seconds * 60 minutes * 24 hours), you just subtract one hour (60 seconds * 60 minutes => 3600).
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Try to find $TimeStampYesterday
The version 0.0.4 should hit OPAR in a few minutes. With that version you can define if it is placed at the top or at the botton of the sidebar...