Skip to content

Commit d5b51d1

Browse files
author
Chris Jepeway
committed
Test that DateTime.later() will preserve $.timezone
1 parent 9c1ad15 commit d5b51d1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

S32-temporal/DateTime.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 219;
4+
plan 220;
55

66
my $orwell = DateTime.new(year => 1984);
77

@@ -596,6 +596,13 @@ is DateTime.now.Date, Date.today, 'coercion to Date';
596596
'subtracting 3 weeks, overflowing to years';
597597
}
598598

599+
# check that timezones are preserved
600+
{
601+
is +DateTime.new(0, :timezone(1)).later(seconds => 1).timezone,
602+
1,
603+
'.later preserves timezone';
604+
}
605+
599606
# RT #121990 Smartmatch against a Date
600607
{
601608
my $now = DateTime.now;

0 commit comments

Comments
 (0)