Skip to content

Commit e6972f2

Browse files
author
Jan-Olof Hendig
committed
Added docs for X::DateTime::TimezoneClash
1 parent bd2191e commit e6972f2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

doc/Type/X/DateTime/TimezoneClash.pod

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
=begin pod
2+
3+
=TITLE class X::DateTime::TimezoneClash
4+
5+
=SUBTITLE Error due to using both timezone offset and :timezone
6+
7+
class X::DateTime::TimezoneClash does X::Temporal is Exception { }
8+
9+
This exception is thrown when code tries to create a C<DateTime> object
10+
specifying both a timezone offset and the named argument C<:timezone>.
11+
12+
say DateTime.new('2015-12-24T12:23:00+0200'); # works
13+
say DateTime.new('2015-12-24T12:23:00', timezone => 7200); # works
14+
say DateTime.new('2015-12-24T12:23:00+0200', timezone => 7200); # exception
15+
16+
=head1 Methods
17+
18+
=head2 message
19+
20+
Returns 'DateTime.new(Str): :timezone argument not allowed with a timestamp offset'
21+
22+
=end pod

0 commit comments

Comments
 (0)