Revision 7964f8ed
Von Moritz Bunkus vor fast 10 Jahren hinzugefügt
SL/Helper/DateTime.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use SL::Util qw(_hashify); |
6 | 6 |
|
7 |
sub new_local { |
|
8 |
my ($class, %params) = @_; |
|
9 |
return $class->new(hour => 0, minute => 0, second => 0, time_zone => $::locale->get_local_time_zone, %params); |
|
10 |
} |
|
11 |
|
|
7 | 12 |
sub now_local { |
8 | 13 |
return shift->now(time_zone => $::locale->get_local_time_zone); |
9 | 14 |
} |
... | ... | |
86 | 91 |
|
87 | 92 |
=over 4 |
88 | 93 |
|
94 |
=item C<new_local %params> |
|
95 |
|
|
96 |
Returns the time given in C<%params> with the time zone set to the |
|
97 |
local time zone. |
|
98 |
|
|
89 | 99 |
=item C<now_local> |
90 | 100 |
|
91 | 101 |
Returns the current time with the time zone set to the local time zone. |
Auch abrufbar als: Unified diff
DateTime-Helfer: neue Funktion now_local